MCPcopy
hub / github.com/LegendApp/legend-state / when

Function when

src/when.ts:58–60  ·  view source on GitHub ↗
(predicate: Selector<T>, effect?: (value: T) => any | (() => any))

Source from the content-addressed store, hash-verified

56}
57
58export function when<T>(predicate: Selector<T>, effect?: (value: T) => any | (() => any)): Promise<T> {
59 return _when<T>(predicate, effect, false);
60}
61export function whenReady<T>(predicate: Selector<T>, effect?: (value: T) => any | (() => any)): Promise<T> {
62 return _when<T>(predicate, effect, true);
63}

Callers 14

tests.test.tsFile · 0.90
persist.test.tsFile · 0.90
useWhenFunction · 0.85
_updateFunction · 0.85
doChangeFunction · 0.85
onChangeRemoteFunction · 0.85
loadLocalFunction · 0.85
syncFunction · 0.85
persistObservableFunction · 0.85
loadTableMethod · 0.85

Calls 1

_whenFunction · 0.85

Tested by

no test coverage detected