MCPcopy
hub / github.com/wavetermdev/waveterm / jotaiLoadableValue

Function jotaiLoadableValue

frontend/util/util.ts:229–234  ·  view source on GitHub ↗
(value: Loadable<T>, def: T)

Source from the content-addressed store, hash-verified

227}
228
229function jotaiLoadableValue<T>(value: Loadable<T>, def: T): T {
230 if (value.state === "hasData") {
231 return value.data;
232 }
233 return def;
234}
235
236const NullAtom = atom(null);
237

Callers 2

constructorMethod · 0.90
getSettingsMenuItemsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected