UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

10 lines (9 loc) 339 B
export declare class KeyValueCache<T, U> { private readonly cacheItems; getEntries(): IterableIterator<[T, U]>; getOrCreate<TCreate extends U>(key: T, createFunc: () => TCreate): TCreate; get(key: T): U | undefined; set(key: T, value: U): void; replaceKey(key: T, newKey: T): void; removeByKey(key: T): void; }