limu
Version:
A fast js lib of immutable data, based on shallow copy on read and mark modified on write mechanism
14 lines (13 loc) • 399 B
TypeScript
import type { ObjectLike } from '../inner-types';
export declare function deepCopy<T = ObjectLike>(obj: T): T;
export declare function makeCopy(val: any): any;
/**
* 尝试生成copy
* @param val
* @returns
*/
export declare function tryMakeCopy(val: any, readOnly?: boolean): any;
export declare function mayMakeCopy(ori: any, options: {
immutBase: boolean;
readOnly: boolean;
}): any;