Interface: ContextEvalOptions
February 16, 2026 ยท View on GitHub
quickjs-emscripten / quickjs-emscripten-core / ContextEvalOptions
Interface: ContextEvalOptions
Defined in: packages/quickjs-emscripten-core/src/types.ts:244
Contents
Properties
backtraceBarrier?
optionalbacktraceBarrier:boolean
Defined in: packages/quickjs-emscripten-core/src/types.ts:263
don't include the stack frames before this eval in the Error() backtraces
compileOnly?
optionalcompileOnly:boolean
Defined in: packages/quickjs-emscripten-core/src/types.ts:261
compile but do not run. The result is an object with a JS_TAG_FUNCTION_BYTECODE or JS_TAG_MODULE tag. It can be executed with JS_EvalFunction().
strict?
optionalstrict:boolean
Defined in: packages/quickjs-emscripten-core/src/types.ts:253
Force "strict" mode
strip?
optionalstrip:boolean
Defined in: packages/quickjs-emscripten-core/src/types.ts:255
Force "strip" mode
type?
optionaltype:"global"|"module"
Defined in: packages/quickjs-emscripten-core/src/types.ts:251
Global code (default), or "module" code?
- When type is
"global", the code is evaluated in the global scope of the QuickJSContext, and the return value is the result of the last expression. - When type is
"module", the code is evaluated is a module scope, may useimport,export, and top-levelawait. The return value is the module's exports, or a promise for the module's exports.