Module

x/ts_morph/common/mod.ts>KeyValueCache

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class KeyValueCache
import { KeyValueCache } from "https://dotland.deno.dev/x/ts_morph@19.0.0/common/mod.ts";

Helper around a Map.

Properties

private
readonly
cacheItems

Methods

clear(): void
get(key: T): U | undefined
getEntries(): IterableIterator<[T, U]>
getKeys(): IterableIterator<T>
getOrCreate<TCreate extends U = U>(key: T, createFunc: () => TCreate): TCreate
getSize(): number
getValues(): IterableIterator<U>
has(key: T): boolean
removeByKey(key: T): void
replaceKey(key: T, newKey: T): void
set(key: T, value: U): void