first commit

This commit is contained in:
rayd1o
2026-03-05 11:46:58 +08:00
commit e7033775d8
20657 changed files with 1988940 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
export type KeyType = string | number;
type ValueType = [number, any];
/** Connect key with `SPLIT` */
export declare function pathKey(keys: KeyType[]): string;
declare class Entity {
instanceId: string;
constructor(instanceId: string);
/** @private Internal cache map. Do not access this directly */
cache: Map<string, ValueType>;
extracted: Set<string>;
get(keys: KeyType[]): ValueType | null;
/** A fast get cache with `get` concat. */
opGet(keyPathStr: string): ValueType | null;
update(keys: KeyType[], valueFn: (origin: ValueType | null) => ValueType | null): void;
/** A fast get cache with `get` concat. */
opUpdate(keyPathStr: string, valueFn: (origin: ValueType | null) => ValueType | null): void;
}
export default Entity;