- replace<K, V, M>(map: M, key: K, oldValue: V, newValue: V, predicate?: ((oldValue: V, newValue: V) => boolean)): M
-
Type Parameters
Type Parameters
-
K
-
V
-
M extends PickMap<K, V, "get" | "has" | "set">
Parameters
-
map: M
-
key: K
-
oldValue: V
-
newValue: V
-
Optional
predicate: ((oldValue: V, newValue: V) => boolean)
-
- (oldValue: V, newValue: V): boolean
-
Returns boolean
Returns M
- replace<K, V, M>(map: M, key: K, value: V): M
-
Type Parameters
Type Parameters
-
K
-
V
-
M extends PickMap<K, V, "has" | "set">
Returns M