mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
feat: Add Deno.mainModule (#6180)
This commit is contained in:
parent
a1b37f177b
commit
ca5b5ba530
8 changed files with 37 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
import * as denoNs from "./deno.ts";
|
||||
import * as denoUnstableNs from "./deno_unstable.ts";
|
||||
import { opMainModule } from "./ops/runtime.ts";
|
||||
import { exit } from "./ops/os.ts";
|
||||
import {
|
||||
readOnly,
|
||||
|
@ -106,6 +107,7 @@ export function bootstrapMainRuntime(): void {
|
|||
if (unstableFlag) {
|
||||
Object.defineProperties(globalThis, unstableMethods);
|
||||
Object.defineProperties(globalThis, unstableProperties);
|
||||
Object.defineProperty(denoNs, "mainModule", getterOnly(opMainModule));
|
||||
Object.assign(denoNs, denoUnstableNs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue