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

Function update

src/functional/update.ts:81–100  ·  view source on GitHub ↗
(
  collection: C,
  key: K,
  notSetValue: NSV | UpdaterFunction<V>,
  updater?: UpdaterFunctionWithNSV<V, NSV>
)

Source from the content-addressed store, hash-verified

79): { [key: string]: V };
80
81export function update<
82 K,
83 V,
84 TProps extends object,
85 C extends PossibleCollection<K, V, TProps>,
86 NSV,
87>(
88 collection: C,
89 key: K,
90 notSetValue: NSV | UpdaterFunction<V>,
91 updater?: UpdaterFunctionWithNSV<V, NSV>
92) {
93 return updateIn(
94 // @ts-expect-error Index signature for type string is missing in type V[]
95 collection,
96 [key],
97 notSetValue,
98 updater
99 );
100}

Callers

nothing calls this directly

Calls 1

updateInFunction · 0.90

Tested by

no test coverage detected