export declare const idKey: unique symbol; export declare const unid: () => symbol; export interface UniqueId { readonly [idKey]: symbol; } export declare type WithId = T extends UniqueId ? T : T & UniqueId; export declare const ID: (obj: T, ignoreGenerated?: boolean) => WithId; /** * 返回一个固定类型的id生成器 * 一些复杂的情况,ID函数无法从上下文进行类型推导,使用这个函数先进行类型的固定 */ export declare const typedID: (ignoreGenerated?: boolean) => (v: T) => WithId;