Skip to main content
Module

x/ts_morph/common/ts_morph_common.d.ts>KeyValueCache

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class KeyValueCache
import { KeyValueCache } from "https://deno.land/x/ts_morph@15.1.0/common/ts_morph_common.d.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