@quirks/ssr
Version:
22 lines (21 loc) • 1.22 kB
TypeScript
import { AppState, Config } from '../../store/src/index.ts';
import { default as Cookies } from 'js-cookie';
export declare const generateConfig: (config: Config, cookiesOptions?: Cookies.CookieAttributes, cookie?: string | undefined | null) => Omit<Omit<import('zustand/vanilla').StoreApi<AppState>, "subscribe"> & {
subscribe: {
(listener: (selectedState: AppState, previousSelectedState: AppState) => void): () => void;
<U>(selector: (state: AppState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
equalityFn?: ((a: U, b: U) => boolean) | undefined;
fireImmediately?: boolean;
} | undefined): () => void;
};
}, "persist"> & {
persist: {
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<AppState, AppState>>) => void;
clearStorage: () => void;
rehydrate: () => Promise<void> | void;
hasHydrated: () => boolean;
onHydrate: (fn: (state: AppState) => void) => () => void;
onFinishHydration: (fn: (state: AppState) => void) => () => void;
getOptions: () => Partial<import('zustand/middleware').PersistOptions<AppState, AppState>>;
};
};