/usr/local/lib/node_modules/pm2/node_modules/@tootallnate/quickjs-emscripten/dist
NameSizeModeActions
generated/-0755rm
asyncify-helpers.d.ts14750644editdlrm
asyncify-helpers.js18180644editdlrm
asyncify-helpers.js.map42050644editdlrm
context-asyncify.d.ts21770644editdlrm
context-asyncify.js23700644editdlrm
context-asyncify.js.map46510644editdlrm
context.d.ts160650644editdlrm
context.js295950644editdlrm
context.js.map533030644editdlrm
debug.d.ts1560644editdlrm
debug.js3270644editdlrm
debug.js.map5180644editdlrm
deferred-promise.d.ts29570644editdlrm
deferred-promise.js37540644editdlrm
deferred-promise.js.map61760644editdlrm
emscripten-types.d.ts38860644editdlrm
emscripten-types.js7760644editdlrm
emscripten-types.js.map54840644editdlrm
errors.d.ts8360644editdlrm
errors.js19140644editdlrm
errors.js.map17800644editdlrm
esmHelpers.d.ts4200644editdlrm
esmHelpers.js7780644editdlrm
esmHelpers.js.map11260644editdlrm
index.d.ts40760644editdlrm
index.js59490644editdlrm
index.js.map65690644editdlrm
lifetime.d.ts43990644editdlrm
lifetime.js67240644editdlrm
lifetime.js.map118580644editdlrm
memory.d.ts7750644editdlrm
memory.js17070644editdlrm
memory.js.map38960644editdlrm
module-asyncify.d.ts23860644editdlrm
module-asyncify.js40350644editdlrm
module-asyncify.js.map64590644editdlrm
module-test.d.ts11180644editdlrm
module-test.js26690644editdlrm
module-test.js.map46720644editdlrm
module.d.ts62720644editdlrm
module.js127400644editdlrm
module.js.map217160644editdlrm
runtime-asyncify.d.ts16870644editdlrm
runtime-asyncify.js18800644editdlrm
runtime-asyncify.js.map40820644editdlrm
runtime.d.ts70480644editdlrm
runtime.js129090644editdlrm
runtime.js.map223670644editdlrm
types-ffi.d.ts34390644editdlrm
types-ffi.js13460644editdlrm
types-ffi.js.map47120644editdlrm
types.d.ts67510644editdlrm
types.js17220644editdlrm
types.js.map92720644editdlrm
variants.d.ts47840644editdlrm
variants.js68930644editdlrm
variants.js.map102260644editdlrm
vm-interface.d.ts26690644editdlrm
vm-interface.js3840644editdlrm
vm-interface.js.map31790644editdlrm
Edit: /usr/local/lib/node_modules/pm2/node_modules/@tootallnate/quickjs-emscripten/dist/module.d.ts (6272B)
import { QuickJSContext } from "./context"; import { Asyncify, AsyncifySleepResult, EitherModule, EmscriptenModuleCallbacks } from "./emscripten-types"; import { JSContextPointer, JSRuntimePointer } from "./types-ffi"; import { InterruptHandler, QuickJSRuntime } from "./runtime"; import { ContextOptions, EitherFFI, JSModuleLoader, RuntimeOptions, RuntimeOptionsBase } from "./types"; type EmscriptenCallback = (...args: [Asyncify | undefined, ...BaseArgs]) => Result | AsyncifySleepResult; type MaybeAsyncEmscriptenCallback> = T extends EmscriptenCallback ? (...args: Args) => Result | Promise : never; type MaybeAsyncEmscriptenCallbacks = { [K in keyof EmscriptenModuleCallbacks]: MaybeAsyncEmscriptenCallback; }; /** * @private */ export interface ContextCallbacks { callFunction: MaybeAsyncEmscriptenCallbacks["callFunction"]; } /** * @private */ export interface RuntimeCallbacks { shouldInterrupt: MaybeAsyncEmscriptenCallbacks["shouldInterrupt"]; loadModuleSource: MaybeAsyncEmscriptenCallbacks["loadModuleSource"]; normalizeModule: MaybeAsyncEmscriptenCallbacks["normalizeModule"]; } /** * Options for [[QuickJSWASMModule.evalCode]]. */ export interface ModuleEvalOptions { /** * Interrupt evaluation if `shouldInterrupt` returns `true`. * See [[shouldInterruptAfterDeadline]]. */ shouldInterrupt?: InterruptHandler; /** * Memory limit, in bytes, of WebAssembly heap memory used by the QuickJS VM. */ memoryLimitBytes?: number; /** * Stack size limit for this vm, in bytes * To remove the limit, set to `0`. */ maxStackSizeBytes?: number; /** * Module loader for any `import` statements or expressions. */ moduleLoader?: JSModuleLoader; } /** * We use static functions per module to dispatch runtime or context calls from * C to the host. This class manages the indirection from a specific runtime or * context pointer to the appropriate callback handler. * * @private */ export declare class QuickJSModuleCallbacks { private module; private contextCallbacks; private runtimeCallbacks; constructor(module: EitherModule); setRuntimeCallbacks(rt: JSRuntimePointer, callbacks: RuntimeCallbacks): void; deleteRuntime(rt: JSRuntimePointer): void; setContextCallbacks(ctx: JSContextPointer, callbacks: ContextCallbacks): void; deleteContext(ctx: JSContextPointer): void; private suspendedCount; private suspended; private handleAsyncify; private cToHostCallbacks; } /** * Process RuntimeOptions and apply them to a QuickJSRuntime. * @private */ export declare function applyBaseRuntimeOptions(runtime: QuickJSRuntime, options: RuntimeOptionsBase): void; /** * Process ModuleEvalOptions and apply them to a QuickJSRuntime. * @private */ export declare function applyModuleEvalRuntimeOptions(runtime: T, options: ModuleEvalOptions): void; /** * This class presents a Javascript interface to QuickJS, a Javascript interpreter * that supports EcmaScript 2020 (ES2020). * * It wraps a single WebAssembly module containing the QuickJS library and * associated helper C code. WebAssembly modules are completely isolated from * each other by the host's WebAssembly runtime. Separate WebAssembly modules * have the most isolation guarantees possible with this library. * * The simplest way to start running code is {@link evalCode}. This shortcut * method will evaluate Javascript safely and return the result as a native * Javascript value. * * For more control over the execution environment, or to interact with values * inside QuickJS, create a context with {@link newContext} or a runtime with * {@link newRuntime}. */ export declare class QuickJSWASMModule { /** @private */ protected ffi: EitherFFI; /** @private */ protected callbacks: QuickJSModuleCallbacks; /** @private */ protected module: EitherModule; /** @private */ constructor(module: EitherModule, ffi: EitherFFI); /** * Create a runtime. * Use the runtime to set limits on CPU and memory usage and configure module * loading for one or more [[QuickJSContext]]s inside the runtime. */ newRuntime(options?: RuntimeOptions): QuickJSRuntime; /** * A simplified API to create a new [[QuickJSRuntime]] and a * [[QuickJSContext]] inside that runtime at the same time. The runtime will * be disposed when the context is disposed. */ newContext(options?: ContextOptions): QuickJSContext; /** * One-off evaluate code without needing to create a [[QuickJSRuntime]] or * [[QuickJSContext]] explicitly. * * To protect against infinite loops, use the `shouldInterrupt` option. The * [[shouldInterruptAfterDeadline]] function will create a time-based deadline. * * If you need more control over how the code executes, create a * [[QuickJSRuntime]] (with [[newRuntime]]) or a [[QuickJSContext]] (with * [[newContext]] or [[QuickJSRuntime.newContext]]), and use its * [[QuickJSContext.evalCode]] method. * * Asynchronous callbacks may not run during the first call to `evalCode`. If * you need to work with async code inside QuickJS, create a runtime and use * [[QuickJSRuntime.executePendingJobs]]. * * @returns The result is coerced to a native Javascript value using JSON * serialization, so properties and values unsupported by JSON will be dropped. * * @throws If `code` throws during evaluation, the exception will be * converted into a native Javascript value and thrown. * * @throws if `options.shouldInterrupt` interrupted execution, will throw a Error * with name `"InternalError"` and message `"interrupted"`. */ evalCode(code: string, options?: ModuleEvalOptions): unknown; /** * Get a low-level interface to the QuickJS functions in this WebAssembly * module. * @experimental * @unstable No warranty is provided with this API. It could change at any time. * @private */ getFFI(): EitherFFI; } export {};