Table of contents

Public class

Signature
class WeakMapCache<T extends object, K> {}
Source

packages/editor/src/lib/utils/WeakMapCache.ts


Properties

items

Public property

Signature
items: WeakMap<T, K>

Methods

access()

Public method

Signature
access(item: T): K | undefined
Parameters
NameDescription

item

T
Returns
K | undefined

bust()

Public method

Signature
bust(): void

get()

Public method

Signature
get<P extends T>(item: P, cb: (item: P) => K): NonNullable<K>
Parameters
NameDescription

item

P

cb

(item: P) => K
Returns
NonNullable<K>

has()

Public method

Signature
has(item: T): boolean
Parameters
NameDescription

item

T
Returns
boolean

invalidate()

Public method

Signature
invalidate(item: T): void
Parameters
NameDescription

item

T
Returns
void

set()

Public method

Signature
set(item: T, value: K): void
Parameters
NameDescription

item

T

value

K
Returns
void

VecLikeAllRecords