type BaseMutation = { error: null; isPending: true; pendingParams: P; value: null; } | { error: Error; isPending: false; pendingParams: P; value: null; } | { error: null; isPending: false; pendingParams: null; value: null; } | { error: null; isPending: false; pendingParams: null; value: T; }; export type Mutation = BaseMutation & { mutate: (...args: P) => Promise; subscribe: () => () => void; }; export declare function mutation(mutator: (...args: P) => Promise): Mutation; export {};