axCreateJSRuntime Generated TypeScript API reference. typescript api api/reference build/apidocs/Function.axCreateJSRuntime.md function axCreateJSRuntime

axCreateJSRuntime

TypeScript
function axCreateJSRuntime(options?: Readonly<{
  allowDenoRemoteImport?: boolean;
  allowedModules?: readonly string[];
  allowUnsafeNodeHostAccess?: boolean;
  blockDynamicImport?: boolean;
  blockShadowRealm?: boolean;
  captureConsole?: boolean;
  debugNodeWorkerPool?: boolean;
  freezeIntrinsics?: boolean;
  lockWorkerIPC?: boolean;
  nodePermissionAllowlist?: Readonly<{
     addons?: boolean;
     childProcess?: boolean;
     fsRead?: readonly string[];
     fsWrite?: readonly string[];
     wasi?: boolean;
  }>;
  nodeWorkerPoolSize?: number;
  outputMode?: AxJSRuntimeOutputMode;
  permissions?: readonly AxJSRuntimePermission[];
  preventGlobalThisExtensions?: boolean;
  resourceLimits?: Readonly<{
     codeRangeSizeMb?: number;
     maxOldGenerationSizeMb?: number;
     maxYoungGenerationSizeMb?: number;
     stackSizeMb?: number;
  }>;
  timeout?: number;
  useNodePermissionModel?: boolean | "auto";
}>): AxJSRuntime;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/funcs/jsRuntime.ts#L925

Factory function for creating an AxJSRuntime.

Parameters

ParameterType
options?Readonly<{ allowDenoRemoteImport?: boolean; allowedModules?: readonly string[]; allowUnsafeNodeHostAccess?: boolean; blockDynamicImport?: boolean; blockShadowRealm?: boolean; captureConsole?: boolean; debugNodeWorkerPool?: boolean; freezeIntrinsics?: boolean; lockWorkerIPC?: boolean; nodePermissionAllowlist?: Readonly<{ addons?: boolean; childProcess?: boolean; fsRead?: readonly string[]; fsWrite?: readonly string[]; wasi?: boolean; }>; nodeWorkerPoolSize?: number; outputMode?: AxJSRuntimeOutputMode; permissions?: readonly AxJSRuntimePermission[]; preventGlobalThisExtensions?: boolean; resourceLimits?: Readonly<{ codeRangeSizeMb?: number; maxOldGenerationSizeMb?: number; maxYoungGenerationSizeMb?: number; stackSizeMb?: number; }>; timeout?: number; useNodePermissionModel?: boolean | "auto"; }>

Returns

AxJSRuntime

Docs