MCPcopy
hub / github.com/TypeStrong/ts-node / addShortCircuitFlag

Function addShortCircuitFlag

src/esm.ts:408–416  ·  view source on GitHub ↗
(fn: () => Promise<T>)

Source from the content-addressed store, hash-verified

406}
407
408async function addShortCircuitFlag<T>(fn: () => Promise<T>) {
409 const ret = await fn();
410 // Not sure if this is necessary; being lazy. Can revisit in the future.
411 if (ret == null) return ret;
412 return {
413 ...ret,
414 shortCircuit: true,
415 };
416}

Callers 2

resolveFunction · 0.85
loadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…