Interface: ContextOptions

February 16, 2026 ยท View on GitHub

quickjs-emscripten


quickjs-emscripten / quickjs-emscripten-core / ContextOptions

Interface: ContextOptions

Defined in: packages/quickjs-emscripten-core/src/types.ts:212

Options for creating a QuickJSContext or QuickJSAsyncContext Pass to QuickJSRuntime#newContext.

Contents

Properties

intrinsics?

optional intrinsics: Intrinsics

Defined in: packages/quickjs-emscripten-core/src/types.ts:229

What built-in objects and language features to enable? If unset, the default intrinsics will be used. To omit all intrinsics, pass an empty array.

To remove a specific intrinsic, but retain the other defaults, override it from DefaultIntrinsics

const contextWithoutDateOrEval = runtime.newContext({
  intrinsics: {
    ...DefaultIntrinsics,
    Date: false,
  }
})