@zedux/stores
Version:
The legacy composable store model of Zedux
22 lines (21 loc) • 743 B
TypeScript
import { PromiseState } from '@zedux/atoms';
export type InjectorDescriptor<T = any> = T extends undefined ? {
cleanup?: () => void;
result?: T;
type: string;
} : {
cleanup?: () => void;
result: T;
type: string;
};
export declare const prefix = "@@zedux";
/**
* IMPORTANT! Keep these in sync with `@zedux/atoms/utils/general.ts`
*/
export declare const Invalidate = 1;
export declare const Destroy = 2;
export declare const PromiseChange = 3;
export declare const EventSent = 4;
export declare const getErrorPromiseState: <T>(error: Error) => PromiseState<T>;
export declare const getInitialPromiseState: <T>(data?: T) => PromiseState<T>;
export declare const getSuccessPromiseState: <T>(data: T) => PromiseState<T>;