PATH:
usr
/
lib
/
node_modules
/
pm2
/
node_modules
/
@tootallnate
/
quickjs-emscripten
/
dist
import { QuickJSContext } from "./context"; import { QuickJSAsyncEmscriptenModule } from "./emscripten-types"; import { QuickJSAsyncFFI } from "./variants"; import { JSRuntimePointer } from "./types-ffi"; import { Lifetime } from "./lifetime"; import { QuickJSModuleCallbacks } from "./module"; import { QuickJSAsyncRuntime } from "./runtime-asyncify"; import { ContextEvalOptions, QuickJSHandle } from "./types"; import { VmCallResult } from "./vm-interface"; export type AsyncFunctionImplementation = (this: QuickJSHandle, ...args: QuickJSHandle[]) => Promise<QuickJSHandle | VmCallResult<QuickJSHandle> | void>; /** * Asyncified version of [[QuickJSContext]]. * * *Asyncify* allows normally synchronous code to wait for asynchronous Promises * or callbacks. The asyncified version of QuickJSContext can wait for async * host functions as though they were synchronous. */ export declare class QuickJSAsyncContext extends QuickJSContext { runtime: QuickJSAsyncRuntime; /** @private */ protected module: QuickJSAsyncEmscriptenModule; /** @private */ protected ffi: QuickJSAsyncFFI; /** @private */ protected rt: Lifetime<JSRuntimePointer>; /** @private */ protected callbacks: QuickJSModuleCallbacks; /** * Asyncified version of [[evalCode]]. */ evalCodeAsync(code: string, filename?: string, /** See [[EvalFlags]] for number semantics */ options?: number | ContextEvalOptions): Promise<VmCallResult<QuickJSHandle>>; /** * Similar to [[newFunction]]. * Convert an async host Javascript function into a synchronous QuickJS function value. * * Whenever QuickJS calls this function, the VM's stack will be unwound while * waiting the async function to complete, and then restored when the returned * promise resolves. * * Asyncified functions must never call other asyncified functions or * `import`, even indirectly, because the stack cannot be unwound twice. * * See [Emscripten's docs on Asyncify](https://emscripten.org/docs/porting/asyncify.html). */ newAsyncifiedFunction(name: string, fn: AsyncFunctionImplementation): QuickJSHandle; }
[-] module-test.js
[edit]
[-] context-asyncify.js
[edit]
[-] context-asyncify.d.ts
[edit]
[-] asyncify-helpers.js
[edit]
[-] runtime-asyncify.js.map
[edit]
[-] errors.js
[edit]
[-] context.js.map
[edit]
[-] memory.d.ts
[edit]
[-] types.js
[edit]
[-] runtime.d.ts
[edit]
[-] types-ffi.js
[edit]
[-] vm-interface.js
[edit]
[-] debug.js
[edit]
[-] types-ffi.d.ts
[edit]
[-] runtime-asyncify.js
[edit]
[-] esmHelpers.d.ts
[edit]
[-] module-test.js.map
[edit]
[-] emscripten-types.d.ts
[edit]
[-] debug.js.map
[edit]
[-] module.d.ts
[edit]
[-] runtime.js
[edit]
[-] emscripten-types.js
[edit]
[-] module-asyncify.js.map
[edit]
[-] variants.d.ts
[edit]
[-] errors.js.map
[edit]
[-] module-asyncify.d.ts
[edit]
[-] runtime.js.map
[edit]
[-] index.js.map
[edit]
[-] types.js.map
[edit]
[-] debug.d.ts
[edit]
[-] emscripten-types.js.map
[edit]
[-] module-test.d.ts
[edit]
[-] types-ffi.js.map
[edit]
[-] deferred-promise.js.map
[edit]
[-] types.d.ts
[edit]
[-] errors.d.ts
[edit]
[-] variants.js.map
[edit]
[-] context.d.ts
[edit]
[-] module.js.map
[edit]
[+]
..
[-] lifetime.js.map
[edit]
[-] deferred-promise.js
[edit]
[-] deferred-promise.d.ts
[edit]
[-] lifetime.js
[edit]
[-] runtime-asyncify.d.ts
[edit]
[+]
generated
[-] asyncify-helpers.d.ts
[edit]
[-] memory.js.map
[edit]
[-] index.d.ts
[edit]
[-] context-asyncify.js.map
[edit]
[-] esmHelpers.js
[edit]
[-] vm-interface.d.ts
[edit]
[-] memory.js
[edit]
[-] lifetime.d.ts
[edit]
[-] module-asyncify.js
[edit]
[-] context.js
[edit]
[-] vm-interface.js.map
[edit]
[-] asyncify-helpers.js.map
[edit]
[-] index.js
[edit]
[-] variants.js
[edit]
[-] module.js
[edit]
[-] esmHelpers.js.map
[edit]