Skip to main content
Module

x/ts_morph/common/mod.ts>WeakCache

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