source: frontend/node_modules/immer/dist/utils/common.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[9af201e]1import { Objectish, AnyObject, AnyMap, AnySet, ImmerState, Archtype } from "../internal";
2/** Returns true if the given value is an Immer draft */
3export declare function isDraft(value: any): boolean;
4/** Returns true if the given value can be drafted by Immer */
5export declare function isDraftable(value: any): boolean;
6export declare function isPlainObject(value: any): boolean;
7/** Get the underlying object that is represented by the given draft */
8export declare function original<T>(value: T): T | undefined;
9export declare const ownKeys: (target: AnyObject) => PropertyKey[];
10export declare const getOwnPropertyDescriptors: <T>(o: T) => { [P in keyof T]: TypedPropertyDescriptor<T[P]>; } & {
11 [x: string]: PropertyDescriptor;
12};
13export declare function each<T extends Objectish>(obj: T, iter: (key: string | number, value: any, source: T) => void, enumerableOnly?: boolean): void;
14export declare function getArchtype(thing: any): Archtype;
15export declare function has(thing: any, prop: PropertyKey): boolean;
16export declare function get(thing: AnyMap | AnyObject, prop: PropertyKey): any;
17export declare function set(thing: any, propOrOldValue: PropertyKey, value: any): void;
18export declare function is(x: any, y: any): boolean;
19export declare function isMap(target: any): target is AnyMap;
20export declare function isSet(target: any): target is AnySet;
21export declare function latest(state: ImmerState): any;
22export declare function shallowCopy(base: any): any;
23/**
24 * Freezes draftable objects. Returns the original object.
25 * By default freezes shallowly, but if the second argument is `true` it will freeze recursively.
26 *
27 * @param obj
28 * @param deep
29 */
30export declare function freeze<T>(obj: T, deep?: boolean): T;
31export declare function isFrozen(obj: any): boolean;
32//# sourceMappingURL=common.d.ts.map
Note: See TracBrowser for help on using the repository browser.