export declare type UpdateFn = (state: S) => S; export declare type Subscriber = (state: S) => void; export declare type Cb = (newV: S, oldV: S, source?: unknown) => void; export declare type Unsubscribe = () => void; export interface ITangleContext { stateOf(key: KeyOf): S[KeyOf]; subscribe(key: KeyOf, cb: Cb]>): Unsubscribe; /** * Update the given * @param key * @param source */ update(key: KeyOf, newV: S[KeyOf], caller?: C): void; } export declare type KeyOf = keyof S;