MCPcopy Index your code
hub / github.com/immutable-js/immutable-js / setIn

Function setIn

src/functional/setIn.ts:12–19  ·  view source on GitHub ↗
(collection: C, keyPath: KeyPath<K>, value: unknown)

Source from the content-addressed store, hash-verified

10 * work with plain Objects and Arrays.
11 */
12export function setIn<
13 K extends PropertyKey,
14 V,
15 TProps extends object,
16 C extends PossibleCollection<K, V, TProps>,
17>(collection: C, keyPath: KeyPath<K>, value: unknown): C {
18 return updateIn(collection, keyPath, NOT_SET, () => value);
19}

Callers

nothing calls this directly

Calls 1

updateInFunction · 0.90

Tested by

no test coverage detected