MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / toggle

Function toggle

packages/setupWizard/src/tabCheckbox.ts:108–110  ·  view source on GitHub ↗
(item: NormalizedChoice<Value> | Separator)

Source from the content-addressed store, hash-verified

106}
107
108function toggle<Value>(item: NormalizedChoice<Value> | Separator): NormalizedChoice<Value> | Separator {
109 return isSelectable(item) ? { ...item, checked: !item.checked } : item;
110}
111
112function check(checked: boolean) {
113 return function <Value>(item: NormalizedChoice<Value> | Separator): NormalizedChoice<Value> | Separator {

Callers 1

tabCheckbox.tsFile · 0.85

Calls 1

isSelectableFunction · 0.85

Tested by

no test coverage detected