UNPKG

617 BTypeScriptView Raw
1declare module "module" {
2 import { URL } from "url";
3 namespace Module {}
4 interface Module extends NodeModule {}
5 class Module {
6 static runMain(): void;
7 static wrap(code: string): string;
8
9 /**
10 * @deprecated Deprecated since: v12.2.0. Please use createRequire() instead.
11 */
12 static createRequireFromPath(path: string): NodeRequire;
13 static createRequire(path: string | URL): NodeRequire;
14 static builtinModules: string[];
15
16 static Module: typeof Module;
17
18 constructor(id: string, parent?: Module);
19 }
20 export = Module;
21}