import { Unsubscribe, Subscriber } from '../subjects/subject'; type ClassMethods = { [K in keyof T]: T[K] extends (...args: any[]) => any ? T[K] : never; }; type PublicMethods = Omit, keyof BaseNotifier>; type UseActorsHook> = () => PublicMethods; type SelectorFunc = (state: State) => ReturnType; export type UseNotifierHook = (selector?: SelectorFunc) => ReturnType; type InstanceOf = T extends { prototype: infer R; } ? R : never; type IgnoreConstructor = Pick; type Subclass = IgnoreConstructor; type ConstructorParams = Class extends new (...args: infer Params) => any ? Params : never; type SubClassData = InstanceOf extends BaseNotifier ? Data : never; type UseFactoryHook = >(selector?: SelectorFunc, ReturnType>) => { state: ReturnType; actions: PublicMethods>; }; export declare class BaseNotifier { #private; constructor(initialState: Data); protected get serverState(): Readonly; protected set serverState(state: Data); protected get state(): Readonly; protected set state(state: Data); /** * Creates a React hook that provides a component-scoped notifier instance. * The instance is created once per component mount and persists across re-renders. * Note: params are captured at hook creation time and changes to params will not * recreate the instance. For dynamic params, use `build()` with your own state management. */ static createFactoryHook(this: SubClass, ...params: ConstructorParams): UseFactoryHook; static build(this: SubClass, ...params: ConstructorParams): InstanceOf; createStateHook(): UseNotifierHook; reset(): void; createActionsHook(): UseActorsHook; subscribe(subscriber: Subscriber): Unsubscribe; protected onFirstSubscriber(): void; protected onLastSubscriber(): void; protected updateState(state: Partial): void; } export {};