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

Function readResultState

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

Source from the content-addressed store, hash-verified

280};
281
282const readResultState = (
283 context: QuickJSContext,
284 handle: QuickJSHandle,
285): {
286 settled: boolean;
287 value: unknown;
288 error: unknown;
289} => ({
290 settled: readPropDump(context, handle, "settled") === true,
291 value: readPropDump(context, handle, "v"),
292 error: readPropDump(context, handle, "e"),
293});
294
295const createLogBridge = (context: QuickJSContext, logs: string[]): QuickJSHandle =>
296 context.newFunction("__executor_log", (levelHandle, lineHandle) => {

Callers 1

evaluateInQuickJsFunction · 0.85

Calls 1

readPropDumpFunction · 0.85

Tested by

no test coverage detected