Skip to main content
Deno 2 is finally here 🎉️
Learn more
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://deno.land/x/ts_morph@16.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