You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
746 B
18 lines
746 B
2 years ago
|
import { Patch, PatchListener, Immer } from "../internal";
|
||
|
/** Each scope represents a `produce` call. */
|
||
|
export interface ImmerScope {
|
||
|
patches_?: Patch[];
|
||
|
inversePatches_?: Patch[];
|
||
|
canAutoFreeze_: boolean;
|
||
|
drafts_: any[];
|
||
|
parent_?: ImmerScope;
|
||
|
patchListener_?: PatchListener;
|
||
|
immer_: Immer;
|
||
|
unfinalizedDrafts_: number;
|
||
|
}
|
||
|
export declare function getCurrentScope(): ImmerScope;
|
||
|
export declare function usePatchesInScope(scope: ImmerScope, patchListener?: PatchListener): void;
|
||
|
export declare function revokeScope(scope: ImmerScope): void;
|
||
|
export declare function leaveScope(scope: ImmerScope): void;
|
||
|
export declare function enterScope(immer: Immer): ImmerScope;
|
||
|
//# sourceMappingURL=scope.d.ts.map
|