mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
fix(ext/node): add vm.constants
(#25630)
This commit is contained in:
parent
4655172c0b
commit
db6fc12b9e
1 changed files with 15 additions and 1 deletions
|
@ -27,7 +27,7 @@ import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts";
|
|||
|
||||
import { primordials } from "ext:core/mod.js";
|
||||
|
||||
const { Symbol, ArrayPrototypeForEach } = primordials;
|
||||
const { Symbol, ArrayPrototypeForEach, ObjectFreeze } = primordials;
|
||||
|
||||
const kParsingContext = Symbol("script parsing context");
|
||||
|
||||
|
@ -349,8 +349,22 @@ export function measureMemory(_options) {
|
|||
notImplemented("measureMemory");
|
||||
}
|
||||
|
||||
const USE_MAIN_CONTEXT_DEFAULT_LOADER = Symbol(
|
||||
"USE_MAIN_CONTEXT_DEFAULT_LOADER",
|
||||
);
|
||||
const DONT_CONTEXTIFY = Symbol("DONT_CONTEXTIFY");
|
||||
|
||||
export const constants = {
|
||||
__proto__: null,
|
||||
USE_MAIN_CONTEXT_DEFAULT_LOADER,
|
||||
DONT_CONTEXTIFY,
|
||||
};
|
||||
|
||||
ObjectFreeze(constants);
|
||||
|
||||
export default {
|
||||
Script,
|
||||
constants,
|
||||
createContext,
|
||||
createScript,
|
||||
runInContext,
|
||||
|
|
Loading…
Reference in a new issue