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

Function readResultState

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

Source from the content-addressed store, hash-verified

225};
226
227const readResultState = (
228 context: QuickJSContext,
229 handle: QuickJSHandle,
230): {
231 settled: boolean;
232 value: unknown;
233 error: unknown;
234} => ({
235 settled: readPropDump(context, handle, "settled") === true,
236 value: readPropDump(context, handle, "v"),
237 error: readPropDump(context, handle, "e"),
238});
239
240const createLogBridge = (context: QuickJSContext, logs: string[]): QuickJSHandle =>
241 context.newFunction("__executor_log", (levelHandle, lineHandle) => {

Callers 1

evaluateInQuickJsFunction · 0.85

Calls 1

readPropDumpFunction · 0.85

Tested by

no test coverage detected