mirror of
https://github.com/denoland/deno.git
synced 2025-08-31 15:57:53 +00:00
feat(node): add Module.runMain()
(#19080)
This PR adds the missing `Module.runMain()` function which is required for tools like `ts-node`. Fixes #19033
This commit is contained in:
parent
e72485fb17
commit
5fd74bfa1c
4 changed files with 22 additions and 0 deletions
|
@ -1108,6 +1108,11 @@ Module.syncBuiltinESMExports = function syncBuiltinESMExports() {
|
|||
throw new Error("not implemented");
|
||||
};
|
||||
|
||||
// Mostly used by tools like ts-node.
|
||||
Module.runMain = function () {
|
||||
Module._load(process.argv[1], null, true);
|
||||
};
|
||||
|
||||
Module.Module = Module;
|
||||
|
||||
nativeModuleExports.module = Module;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue