AtomMap
See source codeTable of contents
A drop-in replacement for Map that stores values in atoms and can be used in reactive contexts.
class AtomMap<K, V> implements Map<K, V> {}Constructor
Constructs a new instance of the AtomMap class
Parameters
| Name | Description |
|---|---|
| |
| |
Properties
[Symbol.toStringTag]
[Symbol.toStringTag]: stringsize
readonly
get size(): numberMethods
[Symbol.iterator](): Generator<[K, V], undefined, unknown>clear()
clear(): voiddelete()
delete(key: K): booleanParameters
| Name | Description |
|---|---|
| |
Returns
booleandeleteMany()
deleteMany(keys: Iterable<K>): [K, V][]Parameters
| Name | Description |
|---|---|
| |
Returns
[K, V][]entries()
entries(): Generator<[K, V], undefined, unknown>forEach()
forEach(
callbackfn: (value: V, key: K, map: AtomMap<K, V>) => void,
thisArg?: any
): voidParameters
| Name | Description |
|---|---|
| |
| |
Returns
voidget()
get(key: K): undefined | VParameters
| Name | Description |
|---|---|
| |
Returns
undefined | Vhas()
has(key: K): booleanParameters
| Name | Description |
|---|---|
| |
Returns
booleankeys()
keys(): Generator<K, undefined, unknown>set()
set(key: K, value: V): thisParameters
| Name | Description |
|---|---|
| |
| |
Returns
thisupdate()
update(key: K, updater: (value: V) => V): voidParameters
| Name | Description |
|---|---|
| |
| |
Returns
voidvalues()
values(): Generator<V, undefined, unknown>Prev
VecNext
RecordType