import { Getter, ResolveStoreApi, LensMetaProps, LensContext, Lens, SetParameter } from "./core";
export { mergeDeep } from "@dhmk/utils";
export declare const mergeDeepLeft: <T>(a: unknown, b: T) => T;
export type CustomSetter<F, T, S> = [
    set: F,
    get: Getter<T>,
    api: ResolveStoreApi<S>,
    ctx: LensContext<T, S>
];
export declare const customSetter: (setter: any) => (fn: any) => (set: any, get: any, api: any, ctx: any) => any;
export type NamedSet<T> = (partial: SetParameter<T>, name?: string, replace?: boolean) => void;
export declare const namedSetter: <T, S = any>(fn: (set: NamedSet<T>, get: Getter<T>, api: ResolveStoreApi<S>, ctx: LensContext<T, S>) => T) => Lens<T, S>;
export declare function subscribe<T, U>(store: {
    subscribe: (fn: (s: T) => any) => any;
    getState(): T;
}, selector: (state: T) => U, effect: (state: U, prevState: U) => void, options?: {
    equalityFn?: (a: U, b: U) => boolean;
    fireImmediately?: boolean;
}): any;
type MetaSetter<T, S> = Exclude<LensMetaProps<T, S>["setter"], undefined>;
export declare function watch<T = any, U = any, S = any>(selector: (state: T) => U, effect: (state: U, prevState: U) => void, options?: {
    equalityFn?: (a: U, b: U) => boolean;
    fireImmediately?: boolean;
}): MetaSetter<T, S>;
export declare function combineWatchers<T, S>(...fns: MetaSetter<T, S>[]): MetaSetter<T, S>;
declare const persist: unique symbol;
export declare function persistOptions<T>(conf: {
    load?: (x: unknown) => T;
    save?: (x: T) => unknown;
}): {
    [persist]: {
        load?: ((x: unknown) => T) | undefined;
        save?: ((x: T) => unknown) | undefined;
    };
};
export declare namespace persistOptions {
    var merge: ((persistedState: unknown, currentState: any) => any) | undefined;
    var partialize: ((state: any) => any) | undefined;
}
