@types/node 15.0.1 → 15.3.1

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.
node/v8.d.ts CHANGED
@@ -1,9 +1,5 @@
1
- declare module 'node:v8' {
2
- export * from 'v8';
3
- }
4
-
5
1
  declare module 'v8' {
6
- import { Readable } from 'node:stream';
2
+ import { Readable } from 'stream';
7
3
 
8
4
  interface HeapSpaceInfo {
9
5
  space_name: string;
@@ -188,4 +184,15 @@ declare module 'v8' {
188
184
  * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
189
185
  */
190
186
  function deserialize(data: NodeJS.TypedArray): any;
187
+
188
+ /**
189
+ * Begins writing coverage report based on the `NODE_V8_COVERAGE` env var.
190
+ * Noop is the env var is not set.
191
+ */
192
+ function takeCoverage(): void;
193
+
194
+ /**
195
+ * Stops writing coverage report.
196
+ */
197
+ function stopCoverage(): void;
191
198
  }
node/vm.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- declare module 'node:vm' {
2
- export * from 'vm';
3
- }
4
-
5
1
  declare module 'vm' {
6
2
  interface Context extends NodeJS.Dict<any> { }
7
3
  interface BaseOptions {
@@ -17,7 +13,7 @@ declare module 'vm' {
17
13
  lineOffset?: number;
18
14
  /**
19
15
  * Specifies the column number offset that is displayed in stack traces produced by this script.
20
- * Default: `0`
16
+ * @default 0
21
17
  */
22
18
  columnOffset?: number;
23
19
  }
node/wasi.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- declare module 'node:wasi' {
2
- export * from 'wasi';
3
- }
4
-
5
1
  declare module 'wasi' {
6
2
  interface WASIOptions {
7
3
  /**
node/worker_threads.d.ts CHANGED
@@ -1,13 +1,10 @@
1
- declare module 'node:worker_threads' {
2
- export * from 'worker_threads';
3
- }
4
-
5
1
  declare module 'worker_threads' {
6
- import { Context } from 'node:vm';
7
- import EventEmitter = require('node:events');
8
- import { Readable, Writable } from 'node:stream';
9
- import { URL } from 'node:url';
10
- import { FileHandle } from 'node:fs/promises';
2
+ import { Context } from 'vm';
3
+ import EventEmitter = require('events');
4
+ import { Readable, Writable } from 'stream';
5
+ import { URL } from 'url';
6
+ import { FileHandle } from 'fs/promises';
7
+ import { EventLoopUtilityFunction } from 'perf_hooks';
11
8
 
12
9
  const isMainThread: boolean;
13
10
  const parentPort: null | MessagePort;
@@ -21,6 +18,10 @@ declare module 'worker_threads' {
21
18
  readonly port2: MessagePort;
22
19
  }
23
20
 
21
+ interface WorkerPerformance {
22
+ eventLoopUtilization: EventLoopUtilityFunction;
23
+ }
24
+
24
25
  type TransferListItem = ArrayBuffer | MessagePort | FileHandle;
25
26
 
26
27
  class MessagePort extends EventEmitter {
@@ -123,6 +124,7 @@ declare module 'worker_threads' {
123
124
  readonly stderr: Readable;
124
125
  readonly threadId: number;
125
126
  readonly resourceLimits?: ResourceLimits;
127
+ readonly performance: WorkerPerformance;
126
128
 
127
129
  /**
128
130
  * @param filename The path to the Worker’s main script or module.
node/zlib.d.ts CHANGED
@@ -1,9 +1,5 @@
1
- declare module 'node:zlib' {
2
- export * from 'zlib';
3
- }
4
-
5
1
  declare module 'zlib' {
6
- import * as stream from 'node:stream';
2
+ import * as stream from 'stream';
7
3
 
8
4
  interface ZlibOptions {
9
5
  /**