WeakMapCache
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
Name | Description |
---|---|
|
|
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
Name | Description |
---|---|
|
|
|
|
Returns
NonNullable<K>
has()
Public method
Signature
has(item: T): boolean
Parameters
Name | Description |
---|---|
|
|
Returns
boolean
invalidate()
Public method
Signature
invalidate(item: T): void
Parameters
Name | Description |
---|---|
|
|
Returns
void
set()
Public method
Signature
set(item: T, value: K): void
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
void