diff --git a/src/js/node/vm.ts b/src/js/node/vm.ts index 7d2b5aa2cf..48bd60f929 100644 --- a/src/js/node/vm.ts +++ b/src/js/node/vm.ts @@ -9,6 +9,10 @@ function runInContext(code, context, options) { return new Script(code, options).runInContext(context); } +function createScript(code, options) { + return new Script(code, options); +} + function compileFunction() { throwNotImplemented("node:vm compileFunction"); } @@ -46,4 +50,5 @@ export default { Module, SourceTextModule, SyntheticModule, + createScript, };