UNPKG

jcommon

Version:

JavaScript 常用纯函数工具库

14 lines (13 loc) 388 B
declare class GlobalCache { private static readonly instance; private readonly cache; private constructor(); static getInstance(): GlobalCache; set<T>(key: string, value: T): void; get<T>(key: string): T | undefined; has(key: string): boolean; delete(key: string): void; clear(): void; } declare const globalCache: GlobalCache; export { globalCache };