@types/node 18.15.8 → 18.15.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. node/README.md +1 -1
  2. node/package.json +2 -2
  3. node/ts4.8/vm.d.ts +144 -11
  4. node/vm.d.ts +144 -11
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 24 Mar 2023 23:02:38 GMT
11
+ * Last updated: Sat, 25 Mar 2023 07:02:51 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.15.8",
3
+ "version": "18.15.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "532e3b7bf905e52ed3f912b56bd08ed94373f657d7715cf289951527234fd224",
235
+ "typesPublisherContentHash": "e74b15f80e053fdf2a0c75afeaa554c5f15833deb0de363d5285c301eaaeae95",
236
236
  "typeScriptVersion": "4.3"
237
237
  }
node/ts4.8/vm.d.ts CHANGED
@@ -56,11 +56,17 @@ declare module 'vm' {
56
56
  columnOffset?: number | undefined;
57
57
  }
58
58
  interface ScriptOptions extends BaseOptions {
59
- displayErrors?: boolean | undefined;
60
- timeout?: number | undefined;
61
- cachedData?: Buffer | undefined;
59
+ /**
60
+ * V8's code cache data for the supplied source.
61
+ */
62
+ cachedData?: Buffer | NodeJS.ArrayBufferView | undefined;
62
63
  /** @deprecated in favor of `script.createCachedData()` */
63
64
  produceCachedData?: boolean | undefined;
65
+ /**
66
+ * Called during evaluation of this module when `import()` is called.
67
+ * If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
68
+ */
69
+ importModuleDynamically?: ((specifier: string, script: Script, importAssertions: Object) => Module) | undefined;
64
70
  }
65
71
  interface RunningScriptOptions extends BaseOptions {
66
72
  /**
@@ -80,10 +86,31 @@ declare module 'vm' {
80
86
  * Default: `false`.
81
87
  */
82
88
  breakOnSigint?: boolean | undefined;
89
+ }
90
+ interface RunningScriptInNewContextOptions extends RunningScriptOptions {
91
+ /**
92
+ * Human-readable name of the newly created context.
93
+ */
94
+ contextName?: CreateContextOptions['name'];
95
+ /**
96
+ * Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
97
+ * but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
98
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
99
+ */
100
+ contextOrigin?: CreateContextOptions['origin'];
101
+ contextCodeGeneration?: CreateContextOptions['codeGeneration'];
83
102
  /**
84
103
  * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
85
104
  */
86
- microtaskMode?: 'afterEvaluate' | undefined;
105
+ microtaskMode?: CreateContextOptions['microtaskMode'];
106
+ }
107
+ interface RunningCodeOptions extends RunningScriptOptions {
108
+ cachedData?: ScriptOptions['cachedData'];
109
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
110
+ }
111
+ interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
112
+ cachedData?: ScriptOptions['cachedData'];
113
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
87
114
  }
88
115
  interface CompileFunctionOptions extends BaseOptions {
89
116
  /**
@@ -144,7 +171,10 @@ declare module 'vm' {
144
171
  * @default 'summary'
145
172
  */
146
173
  mode?: MeasureMemoryMode | undefined;
147
- context?: Context | undefined;
174
+ /**
175
+ * @default 'default'
176
+ */
177
+ execution?: 'default' | 'eager' | undefined;
148
178
  }
149
179
  interface MemoryMeasurement {
150
180
  total: {
@@ -158,7 +188,7 @@ declare module 'vm' {
158
188
  * @since v0.3.1
159
189
  */
160
190
  class Script {
161
- constructor(code: string, options?: ScriptOptions);
191
+ constructor(code: string, options?: ScriptOptions | string);
162
192
  /**
163
193
  * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
164
194
  * to local scope.
@@ -220,7 +250,7 @@ declare module 'vm' {
220
250
  * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
221
251
  * @return the result of the very last statement executed in the script.
222
252
  */
223
- runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
253
+ runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
224
254
  /**
225
255
  * Runs the compiled code contained by the `vm.Script` within the context of the
226
256
  * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
@@ -273,6 +303,10 @@ declare module 'vm' {
273
303
  cachedDataProduced?: boolean | undefined;
274
304
  cachedDataRejected?: boolean | undefined;
275
305
  cachedData?: Buffer | undefined;
306
+ /**
307
+ * When the script is compiled from a source that contains a source map magic comment, this property will be set to the URL of the source map.
308
+ */
309
+ sourceMapURL?: string | undefined;
276
310
  }
277
311
  /**
278
312
  * If given a `contextObject`, the `vm.createContext()` method will `prepare
@@ -345,7 +379,7 @@ declare module 'vm' {
345
379
  * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
346
380
  * @return the result of the very last statement executed in the script.
347
381
  */
348
- function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
382
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
349
383
  /**
350
384
  * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
351
385
  * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
@@ -374,7 +408,7 @@ declare module 'vm' {
374
408
  * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
375
409
  * @return the result of the very last statement executed in the script.
376
410
  */
377
- function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
411
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningCodeInNewContextOptions | string): any;
378
412
  /**
379
413
  * `vm.runInThisContext()` compiles `code`, runs it within the context of the
380
414
  * current `global` and returns the result. Running code does not have access to
@@ -437,7 +471,7 @@ declare module 'vm' {
437
471
  * @param code The JavaScript code to compile and run.
438
472
  * @return the result of the very last statement executed in the script.
439
473
  */
440
- function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
474
+ function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
441
475
  /**
442
476
  * Compiles the given code into the provided context (if no context is
443
477
  * supplied, the current context is used), and returns it wrapped inside a
@@ -447,7 +481,9 @@ declare module 'vm' {
447
481
  * @param params An array of strings containing all parameters for the function.
448
482
  */
449
483
  function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function & {
450
- cachedDataRejected: Script['cachedDataRejected'];
484
+ cachedData?: Script['cachedData'] | undefined;
485
+ cachedDataProduced?: Script['cachedDataProduced'] | undefined;
486
+ cachedDataRejected?: Script['cachedDataRejected'] | undefined;
451
487
  };
452
488
  /**
453
489
  * Measure the memory known to V8 and used by all contexts known to the
@@ -505,6 +541,103 @@ declare module 'vm' {
505
541
  * @experimental
506
542
  */
507
543
  function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
544
+
545
+ interface ModuleEvaluateOptions {
546
+ timeout?: RunningScriptOptions['timeout'] | undefined;
547
+ breakOnSigint?: RunningScriptOptions['breakOnSigint'] | undefined;
548
+ }
549
+ type ModuleLinker = (specifier: string, referencingModule: Module, extra: { assert: Object }) => Module | Promise<Module>;
550
+ type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
551
+ class Module {
552
+ /**
553
+ * The specifiers of all dependencies of this module.
554
+ */
555
+ dependencySpecifiers: readonly string[];
556
+ /**
557
+ * If the `module.status` is `'errored'`, this property contains the exception thrown by the module during evaluation.
558
+ * If the status is anything else, accessing this property will result in a thrown exception.
559
+ */
560
+ error: any;
561
+ /**
562
+ * The identifier of the current module, as set in the constructor.
563
+ */
564
+ identifier: string;
565
+ context: Context;
566
+ /**
567
+ * The namespace object of the module. This is only available after linking (`module.link()`) has completed.
568
+ */
569
+ namespace: Object;
570
+ /**
571
+ * The current status of the module.
572
+ */
573
+ status: ModuleStatus;
574
+ /**
575
+ * Evaluate the module.
576
+ *
577
+ * This must be called after the module has been linked; otherwise it will reject
578
+ * It could be called also when the module has already been evaluated, in which case it will either do nothing
579
+ * if the initial evaluation ended in success (`module.status` is `'evaluated'`) or it will re-throw the exception
580
+ * that the initial evaluation resulted in (`module.status` is `'errored'`).
581
+ *
582
+ * This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
583
+ */
584
+ evaluate(options?: ModuleEvaluateOptions): Promise<void>;
585
+ /**
586
+ * Link module dependencies. This method must be called before evaluation, and can only be called once per module.
587
+ */
588
+ link(linker: ModuleLinker): Promise<void>;
589
+ }
590
+
591
+ interface SourceTextModuleOptions {
592
+ /**
593
+ * String used in stack traces.
594
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
595
+ */
596
+ identifier?: string | undefined;
597
+ cachedData?: ScriptOptions['cachedData'] | undefined;
598
+ context?: Context | undefined;
599
+ lineOffset?: BaseOptions['lineOffset'] | undefined;
600
+ columnOffset?: BaseOptions['columnOffset'] | undefined;
601
+ /**
602
+ * Called during evaluation of this module to initialize the `import.meta`.
603
+ */
604
+ initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
605
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'] | undefined;
606
+ }
607
+ class SourceTextModule extends Module {
608
+ /**
609
+ * Creates a new `SourceTextModule` instance.
610
+ * @param code JavaScript Module code to parse
611
+ */
612
+ constructor(code: string, options?: SourceTextModuleOptions);
613
+ }
614
+
615
+ interface SyntheticModuleOptions {
616
+ /**
617
+ * String used in stack traces.
618
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
619
+ */
620
+ identifier?: string | undefined;
621
+ /**
622
+ * The contextified object as returned by the `vm.createContext()` method, to compile and evaluate this module in.
623
+ */
624
+ context?: Context | undefined;
625
+ }
626
+ class SyntheticModule extends Module {
627
+ /**
628
+ * Creates a new `SyntheticModule` instance.
629
+ * @param exportNames Array of names that will be exported from the module.
630
+ * @param evaluateCallback Called when the module is evaluated.
631
+ */
632
+ constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
633
+ /**
634
+ * This method is used after the module is linked to set the values of exports.
635
+ * If it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error will be thrown.
636
+ * @param name
637
+ * @param value
638
+ */
639
+ setExport(name: string, value: any): void;
640
+ }
508
641
  }
509
642
  declare module 'node:vm' {
510
643
  export * from 'vm';
node/vm.d.ts CHANGED
@@ -56,11 +56,17 @@ declare module 'vm' {
56
56
  columnOffset?: number | undefined;
57
57
  }
58
58
  interface ScriptOptions extends BaseOptions {
59
- displayErrors?: boolean | undefined;
60
- timeout?: number | undefined;
61
- cachedData?: Buffer | undefined;
59
+ /**
60
+ * V8's code cache data for the supplied source.
61
+ */
62
+ cachedData?: Buffer | NodeJS.ArrayBufferView | undefined;
62
63
  /** @deprecated in favor of `script.createCachedData()` */
63
64
  produceCachedData?: boolean | undefined;
65
+ /**
66
+ * Called during evaluation of this module when `import()` is called.
67
+ * If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
68
+ */
69
+ importModuleDynamically?: ((specifier: string, script: Script, importAssertions: Object) => Module) | undefined;
64
70
  }
65
71
  interface RunningScriptOptions extends BaseOptions {
66
72
  /**
@@ -80,10 +86,31 @@ declare module 'vm' {
80
86
  * Default: `false`.
81
87
  */
82
88
  breakOnSigint?: boolean | undefined;
89
+ }
90
+ interface RunningScriptInNewContextOptions extends RunningScriptOptions {
91
+ /**
92
+ * Human-readable name of the newly created context.
93
+ */
94
+ contextName?: CreateContextOptions['name'];
95
+ /**
96
+ * Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
97
+ * but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
98
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
99
+ */
100
+ contextOrigin?: CreateContextOptions['origin'];
101
+ contextCodeGeneration?: CreateContextOptions['codeGeneration'];
83
102
  /**
84
103
  * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
85
104
  */
86
- microtaskMode?: 'afterEvaluate' | undefined;
105
+ microtaskMode?: CreateContextOptions['microtaskMode'];
106
+ }
107
+ interface RunningCodeOptions extends RunningScriptOptions {
108
+ cachedData?: ScriptOptions['cachedData'];
109
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
110
+ }
111
+ interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
112
+ cachedData?: ScriptOptions['cachedData'];
113
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
87
114
  }
88
115
  interface CompileFunctionOptions extends BaseOptions {
89
116
  /**
@@ -144,7 +171,10 @@ declare module 'vm' {
144
171
  * @default 'summary'
145
172
  */
146
173
  mode?: MeasureMemoryMode | undefined;
147
- context?: Context | undefined;
174
+ /**
175
+ * @default 'default'
176
+ */
177
+ execution?: 'default' | 'eager' | undefined;
148
178
  }
149
179
  interface MemoryMeasurement {
150
180
  total: {
@@ -158,7 +188,7 @@ declare module 'vm' {
158
188
  * @since v0.3.1
159
189
  */
160
190
  class Script {
161
- constructor(code: string, options?: ScriptOptions);
191
+ constructor(code: string, options?: ScriptOptions | string);
162
192
  /**
163
193
  * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
164
194
  * to local scope.
@@ -220,7 +250,7 @@ declare module 'vm' {
220
250
  * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
221
251
  * @return the result of the very last statement executed in the script.
222
252
  */
223
- runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
253
+ runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
224
254
  /**
225
255
  * Runs the compiled code contained by the `vm.Script` within the context of the
226
256
  * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
@@ -273,6 +303,10 @@ declare module 'vm' {
273
303
  cachedDataProduced?: boolean | undefined;
274
304
  cachedDataRejected?: boolean | undefined;
275
305
  cachedData?: Buffer | undefined;
306
+ /**
307
+ * When the script is compiled from a source that contains a source map magic comment, this property will be set to the URL of the source map.
308
+ */
309
+ sourceMapURL?: string | undefined;
276
310
  }
277
311
  /**
278
312
  * If given a `contextObject`, the `vm.createContext()` method will `prepare
@@ -345,7 +379,7 @@ declare module 'vm' {
345
379
  * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
346
380
  * @return the result of the very last statement executed in the script.
347
381
  */
348
- function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
382
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
349
383
  /**
350
384
  * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
351
385
  * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
@@ -374,7 +408,7 @@ declare module 'vm' {
374
408
  * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
375
409
  * @return the result of the very last statement executed in the script.
376
410
  */
377
- function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
411
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningCodeInNewContextOptions | string): any;
378
412
  /**
379
413
  * `vm.runInThisContext()` compiles `code`, runs it within the context of the
380
414
  * current `global` and returns the result. Running code does not have access to
@@ -437,7 +471,7 @@ declare module 'vm' {
437
471
  * @param code The JavaScript code to compile and run.
438
472
  * @return the result of the very last statement executed in the script.
439
473
  */
440
- function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
474
+ function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
441
475
  /**
442
476
  * Compiles the given code into the provided context (if no context is
443
477
  * supplied, the current context is used), and returns it wrapped inside a
@@ -447,7 +481,9 @@ declare module 'vm' {
447
481
  * @param params An array of strings containing all parameters for the function.
448
482
  */
449
483
  function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function & {
450
- cachedDataRejected: Script['cachedDataRejected'];
484
+ cachedData?: Script['cachedData'] | undefined;
485
+ cachedDataProduced?: Script['cachedDataProduced'] | undefined;
486
+ cachedDataRejected?: Script['cachedDataRejected'] | undefined;
451
487
  };
452
488
  /**
453
489
  * Measure the memory known to V8 and used by all contexts known to the
@@ -505,6 +541,103 @@ declare module 'vm' {
505
541
  * @experimental
506
542
  */
507
543
  function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
544
+
545
+ interface ModuleEvaluateOptions {
546
+ timeout?: RunningScriptOptions['timeout'] | undefined;
547
+ breakOnSigint?: RunningScriptOptions['breakOnSigint'] | undefined;
548
+ }
549
+ type ModuleLinker = (specifier: string, referencingModule: Module, extra: { assert: Object }) => Module | Promise<Module>;
550
+ type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
551
+ class Module {
552
+ /**
553
+ * The specifiers of all dependencies of this module.
554
+ */
555
+ dependencySpecifiers: readonly string[];
556
+ /**
557
+ * If the `module.status` is `'errored'`, this property contains the exception thrown by the module during evaluation.
558
+ * If the status is anything else, accessing this property will result in a thrown exception.
559
+ */
560
+ error: any;
561
+ /**
562
+ * The identifier of the current module, as set in the constructor.
563
+ */
564
+ identifier: string;
565
+ context: Context;
566
+ /**
567
+ * The namespace object of the module. This is only available after linking (`module.link()`) has completed.
568
+ */
569
+ namespace: Object;
570
+ /**
571
+ * The current status of the module.
572
+ */
573
+ status: ModuleStatus;
574
+ /**
575
+ * Evaluate the module.
576
+ *
577
+ * This must be called after the module has been linked; otherwise it will reject
578
+ * It could be called also when the module has already been evaluated, in which case it will either do nothing
579
+ * if the initial evaluation ended in success (`module.status` is `'evaluated'`) or it will re-throw the exception
580
+ * that the initial evaluation resulted in (`module.status` is `'errored'`).
581
+ *
582
+ * This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
583
+ */
584
+ evaluate(options?: ModuleEvaluateOptions): Promise<void>;
585
+ /**
586
+ * Link module dependencies. This method must be called before evaluation, and can only be called once per module.
587
+ */
588
+ link(linker: ModuleLinker): Promise<void>;
589
+ }
590
+
591
+ interface SourceTextModuleOptions {
592
+ /**
593
+ * String used in stack traces.
594
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
595
+ */
596
+ identifier?: string | undefined;
597
+ cachedData?: ScriptOptions['cachedData'] | undefined;
598
+ context?: Context | undefined;
599
+ lineOffset?: BaseOptions['lineOffset'] | undefined;
600
+ columnOffset?: BaseOptions['columnOffset'] | undefined;
601
+ /**
602
+ * Called during evaluation of this module to initialize the `import.meta`.
603
+ */
604
+ initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
605
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'] | undefined;
606
+ }
607
+ class SourceTextModule extends Module {
608
+ /**
609
+ * Creates a new `SourceTextModule` instance.
610
+ * @param code JavaScript Module code to parse
611
+ */
612
+ constructor(code: string, options?: SourceTextModuleOptions);
613
+ }
614
+
615
+ interface SyntheticModuleOptions {
616
+ /**
617
+ * String used in stack traces.
618
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
619
+ */
620
+ identifier?: string | undefined;
621
+ /**
622
+ * The contextified object as returned by the `vm.createContext()` method, to compile and evaluate this module in.
623
+ */
624
+ context?: Context | undefined;
625
+ }
626
+ class SyntheticModule extends Module {
627
+ /**
628
+ * Creates a new `SyntheticModule` instance.
629
+ * @param exportNames Array of names that will be exported from the module.
630
+ * @param evaluateCallback Called when the module is evaluated.
631
+ */
632
+ constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
633
+ /**
634
+ * This method is used after the module is linked to set the values of exports.
635
+ * If it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error will be thrown.
636
+ * @param name
637
+ * @param value
638
+ */
639
+ setExport(name: string, value: any): void;
640
+ }
508
641
  }
509
642
  declare module 'node:vm' {
510
643
  export * from 'vm';