@sebastianwessel/quickjs
Version:
A typescript package to execute JavaScript and TypeScript code in a WebAssembly QuickJS sandbox
10 lines (9 loc) • 489 B
TypeScript
import type { ContextEvalOptions } from 'quickjs-emscripten-core';
import type { ErrorResponse } from './ErrorResponse.js';
import type { OkResponseCheck } from './OkResponseCheck.js';
import type { Prettify } from './Prettify.js';
export type SandboxValidateCode = (code: string, filename?: string, options?: Prettify<Omit<ContextEvalOptions, 'type'> & {
executionTimeout?: number;
maxStackSize?: number;
memoryLimit?: number;
}>) => Promise<OkResponseCheck | ErrorResponse>;