MCPcopy
hub / github.com/continuedev/continue / replace

Function replace

gui/src/hooks/useArrayState.ts:18–24  ·  view source on GitHub ↗
(atIndex: number, withItem: T)

Source from the content-addressed store, hash-verified

16 }
17
18 function replace(atIndex: number, withItem: T) {
19 setValue((prev) => {
20 let updated = [...prev];
21 updated[atIndex] = withItem;
22 return updated;
23 });
24 }
25
26 return { value, add, remove, edit, replace };
27}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected