limu
Version:
A fast js lib of immutable data, based on shallow copy on read and mark modified on write mechanism
45 lines (44 loc) • 1.97 kB
TypeScript
import type { DataType } from '../inner-types';
/**
* 因 3.0 做了大的架构改进,让其行为和 immer 保持了 100% 一致,和 2.0 版本处于不兼容状态
* 此处标记版本号辅助测试用例为2.0走一些特殊逻辑
*/
export declare const LIMU_MAJOR_VER = 3;
export declare const VER = "3.13.1";
/** meta 数据key,仅 debug 模式才挂到对象的原型上 */
export declare const META_KEY: unique symbol;
/** 版本号key */
export declare const META_VER: unique symbol;
export declare const IMMUT_BASE: unique symbol;
/** markRaw 调用会给对象标记 IS_RAW 为 true */
export declare const IS_RAW: unique symbol;
export declare const MAP = "Map";
export declare const SET = "Set";
export declare const ARRAY = "Array";
export declare const OBJECT = "Object";
/**
* limu 需要关心的 symbol 读取 key 列表
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
*/
export declare const JS_SYM_KEYS: symbol[];
export declare const CAREFUL_TYPES: {
readonly Map: "Map";
readonly Set: "Set";
readonly Array: "Array";
};
export declare const OBJ_DESC = "[object Object]";
export declare const MAP_DESC = "[object Map]";
export declare const SET_DESC = "[object Set]";
export declare const ARR_DESC = "[object Array]";
export declare const FN_DESC = "[object Function]";
export declare const desc2dataType: Record<string, DataType>;
export declare const SHOULD_REASSIGN_ARR_METHODS: string[];
export declare const SHOULD_REASSIGN_MAP_METHODS: string[];
export declare const SHOULD_REASSIGN_SET_METHODS: string[];
export declare const CHANGE_ARR_ORDER_METHODS: string[];
export declare const arrFnKeys: string[];
export declare const mapFnKeys: string[];
export declare const setFnKeys: string[];
export declare const CAREFUL_FNKEYS: Record<string, string[]>;
export declare const CHANGE_FNKEYS: Record<string, string[]>;
export declare const PROXYITEM_FNKEYS: Record<string, string[]>;