Module

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

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

A wrapper around WeakMap.

Type Parameters

T extends object
U

Properties

private
readonly
cacheItems

Methods

get(key: T): U | undefined
getOrCreate<TCreate extends U = U>(key: T, createFunc: () => TCreate): TCreate
has(key: T): boolean
removeByKey(key: T): void
set(key: T, value: U): void