UNPKG

limu

Version:

A fast js lib of immutable data, based on shallow copy on read and mark modified on write mechanism

16 lines (15 loc) 732 B
import { AnyObject, DraftMeta, IApiCtx } from '../inner-types'; export declare function createScopedMeta(key: any, baseData: any, options: any): DraftMeta<AnyObject<any>>; export declare function shouldGenerateProxyItems(parentType: any, key: any): boolean; export declare function getMayProxiedVal(val: any, options: { parentMeta: DraftMeta; } & AnyObject): any; export declare function getUnProxyValue(value: any, apiCtx: IApiCtx): any; /** * 拦截 set delete clear add * 支持用户使用 callback 的第三位参数 (val, key, mapOrSet) 的 mapOrSet 当做 draft 使用 */ export declare function replaceSetOrMapMethods(mapOrSet: any, meta: DraftMeta, options: { dataType: 'Map' | 'Set'; apiCtx: any; }): void;