MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readResultState

Function readResultState

packages/kernel/runtime-quickjs/src/index.ts:262–273  ·  view source on GitHub ↗
(
  context: QuickJSContext,
  handle: QuickJSHandle,
)

Source from the content-addressed store, hash-verified

260};
261
262const readResultState = (
263 context: QuickJSContext,
264 handle: QuickJSHandle,
265): {
266 settled: boolean;
267 value: unknown;
268 error: unknown;
269} => ({
270 settled: readPropDump(context, handle, "settled") === true,
271 value: readPropDump(context, handle, "v"),
272 error: readPropDump(context, handle, "e"),
273});
274
275const createLogBridge = (context: QuickJSContext, logs: string[]): QuickJSHandle =>
276 context.newFunction("__executor_log", (levelHandle, lineHandle) => {

Callers 1

evaluateInQuickJsFunction · 0.85

Calls 1

readPropDumpFunction · 0.85

Tested by

no test coverage detected