1 | declare module 'node:module' {
|
2 | import Module = require('module');
|
3 | export = Module;
|
4 | }
|
5 |
|
6 | declare module 'module' {
|
7 | import { URL } from 'node:url';
|
8 | namespace Module {
|
9 | |
10 |
|
11 |
|
12 |
|
13 | function syncBuiltinESMExports(): void;
|
14 |
|
15 | function findSourceMap(path: string, error?: Error): SourceMap;
|
16 | interface SourceMapPayload {
|
17 | file: string;
|
18 | version: number;
|
19 | sources: string[];
|
20 | sourcesContent: string[];
|
21 | names: string[];
|
22 | mappings: string;
|
23 | sourceRoot: string;
|
24 | }
|
25 |
|
26 | interface SourceMapping {
|
27 | generatedLine: number;
|
28 | generatedColumn: number;
|
29 | originalSource: string;
|
30 | originalLine: number;
|
31 | originalColumn: number;
|
32 | }
|
33 |
|
34 | class SourceMap {
|
35 | readonly payload: SourceMapPayload;
|
36 | constructor(payload: SourceMapPayload);
|
37 | findEntry(line: number, column: number): SourceMapping;
|
38 | }
|
39 | }
|
40 | interface Module extends NodeModule {}
|
41 | class Module {
|
42 | static runMain(): void;
|
43 | static wrap(code: string): string;
|
44 |
|
45 | |
46 |
|
47 |
|
48 | static createRequireFromPath(path: string): NodeRequire;
|
49 | static createRequire(path: string | URL): NodeRequire;
|
50 | static builtinModules: string[];
|
51 |
|
52 | static Module: typeof Module;
|
53 |
|
54 | constructor(id: string, parent?: Module);
|
55 | }
|
56 | export = Module;
|
57 | }
|