@types/node 16.0.3 → 16.3.3

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/timers.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'timers' {
2
- import { Abortable } from 'events';
3
- import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'timers/promises';
2
+ import { Abortable } from 'node:events';
3
+ import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises';
4
4
 
5
5
  interface TimerOptions extends Abortable {
6
6
  /**
@@ -73,29 +73,3 @@ declare module 'timers' {
73
73
  declare module 'node:timers' {
74
74
  export * from 'timers';
75
75
  }
76
-
77
- declare module 'timers/promises' {
78
- import { TimerOptions } from 'timers';
79
-
80
- /**
81
- * Returns a promise that resolves after the specified delay in milliseconds.
82
- * @param delay defaults to 1
83
- */
84
- function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
85
-
86
- /**
87
- * Returns a promise that resolves in the next tick.
88
- */
89
- function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
90
-
91
- /**
92
- *
93
- * Returns an async iterator that generates values in an interval of delay ms.
94
- * @param delay defaults to 1
95
- */
96
- function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
97
- }
98
-
99
- declare module 'node:timers/promises' {
100
- export * from 'timers/promises';
101
- }
node/tls.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'tls' {
2
- import { X509Certificate } from 'crypto';
3
- import * as net from 'net';
2
+ import { X509Certificate } from 'node:crypto';
3
+ import * as net from 'node:net';
4
4
 
5
5
  const CLIENT_RENEG_LIMIT: number;
6
6
  const CLIENT_RENEG_WINDOW: number;
node/ts3.6/assert.d.ts CHANGED
@@ -96,3 +96,8 @@ declare module 'assert' {
96
96
 
97
97
  export = assert;
98
98
  }
99
+
100
+ declare module 'node:assert' {
101
+ import assert = require('assert');
102
+ export = assert;
103
+ }
node/ts3.6/base.d.ts CHANGED
@@ -23,7 +23,7 @@
23
23
  /// <reference path="../constants.d.ts" />
24
24
  /// <reference path="../crypto.d.ts" />
25
25
  /// <reference path="../dgram.d.ts" />
26
- /// <reference path="../diagnostic_channel.d.ts" />
26
+ /// <reference path="../diagnostics_channel.d.ts" />
27
27
  /// <reference path="../dns.d.ts" />
28
28
  /// <reference path="../dns/promises.d.ts" />
29
29
  /// <reference path="../dns/promises.d.ts" />
@@ -55,7 +55,6 @@
55
55
  /// <reference path="../tty.d.ts" />
56
56
  /// <reference path="../url.d.ts" />
57
57
  /// <reference path="../util.d.ts" />
58
- /// <reference path="../util/types.d.ts" />
59
58
  /// <reference path="../v8.d.ts" />
60
59
  /// <reference path="../vm.d.ts" />
61
60
  /// <reference path="../worker_threads.d.ts" />
node/tty.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'tty' {
2
- import * as net from 'net';
2
+ import * as net from 'node:net';
3
3
 
4
4
  function isatty(fd: number): boolean;
5
5
  class ReadStream extends net.Socket {
node/url.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'url' {
2
- import { ClientRequestArgs } from 'http';
3
- import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
2
+ import { ClientRequestArgs } from 'node:http';
3
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
4
4
 
5
5
  // Input to `url.format`
6
6
  interface UrlObject {
node/util.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'util' {
2
- import * as types from 'util/types';
2
+ import * as types from 'node:util/types';
3
3
 
4
4
  export interface InspectOptions {
5
5
  /**
@@ -197,6 +197,72 @@ declare module 'util' {
197
197
  }
198
198
  }
199
199
 
200
+ declare module 'util/types' {
201
+ export * from 'util/types';
202
+ }
203
+
204
+ declare module 'util/types' {
205
+ import { KeyObject, webcrypto } from 'node:crypto';
206
+
207
+ function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
208
+ function isArgumentsObject(object: unknown): object is IArguments;
209
+ function isArrayBuffer(object: unknown): object is ArrayBuffer;
210
+ function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
211
+ function isAsyncFunction(object: unknown): boolean;
212
+ function isBigInt64Array(value: unknown): value is BigInt64Array;
213
+ function isBigUint64Array(value: unknown): value is BigUint64Array;
214
+ function isBooleanObject(object: unknown): object is Boolean;
215
+ function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
216
+ function isDataView(object: unknown): object is DataView;
217
+ function isDate(object: unknown): object is Date;
218
+ function isExternal(object: unknown): boolean;
219
+ function isFloat32Array(object: unknown): object is Float32Array;
220
+ function isFloat64Array(object: unknown): object is Float64Array;
221
+ function isGeneratorFunction(object: unknown): object is GeneratorFunction;
222
+ function isGeneratorObject(object: unknown): object is Generator;
223
+ function isInt8Array(object: unknown): object is Int8Array;
224
+ function isInt16Array(object: unknown): object is Int16Array;
225
+ function isInt32Array(object: unknown): object is Int32Array;
226
+ function isMap<T>(
227
+ object: T | {},
228
+ ): object is T extends ReadonlyMap<any, any>
229
+ ? unknown extends T
230
+ ? never
231
+ : ReadonlyMap<any, any>
232
+ : Map<unknown, unknown>;
233
+ function isMapIterator(object: unknown): boolean;
234
+ function isModuleNamespaceObject(value: unknown): boolean;
235
+ function isNativeError(object: unknown): object is Error;
236
+ function isNumberObject(object: unknown): object is Number;
237
+ function isPromise(object: unknown): object is Promise<unknown>;
238
+ function isProxy(object: unknown): boolean;
239
+ function isRegExp(object: unknown): object is RegExp;
240
+ function isSet<T>(
241
+ object: T | {},
242
+ ): object is T extends ReadonlySet<any>
243
+ ? unknown extends T
244
+ ? never
245
+ : ReadonlySet<any>
246
+ : Set<unknown>;
247
+ function isSetIterator(object: unknown): boolean;
248
+ function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
249
+ function isStringObject(object: unknown): object is String;
250
+ function isSymbolObject(object: unknown): object is Symbol;
251
+ function isTypedArray(object: unknown): object is NodeJS.TypedArray;
252
+ function isUint8Array(object: unknown): object is Uint8Array;
253
+ function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
254
+ function isUint16Array(object: unknown): object is Uint16Array;
255
+ function isUint32Array(object: unknown): object is Uint32Array;
256
+ function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
257
+ function isWeakSet(object: unknown): object is WeakSet<object>;
258
+ function isKeyObject(object: unknown): object is KeyObject;
259
+ function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
260
+ }
261
+
200
262
  declare module 'node:util' {
201
263
  export * from 'util';
202
264
  }
265
+
266
+ declare module 'node:util/types' {
267
+ export * from 'util/types';
268
+ }
node/v8.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'v8' {
2
- import { Readable } from 'stream';
2
+ import { Readable } from 'node:stream';
3
3
 
4
4
  interface HeapSpaceInfo {
5
5
  space_name: string;
node/worker_threads.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  declare module 'worker_threads' {
2
2
  import { Blob } from 'node:buffer';
3
- import { Context } from 'vm';
4
- import { EventEmitter } from 'events';
5
- import { EventLoopUtilityFunction } from 'perf_hooks';
6
- import { FileHandle } from 'fs/promises';
7
- import { Readable, Writable } from 'stream';
8
- import { URL } from 'url';
9
- import { X509Certificate } from 'crypto';
3
+ import { Context } from 'node:vm';
4
+ import { EventEmitter } from 'node:events';
5
+ import { EventLoopUtilityFunction } from 'node:perf_hooks';
6
+ import { FileHandle } from 'node:fs/promises';
7
+ import { Readable, Writable } from 'node:stream';
8
+ import { URL } from 'node:url';
9
+ import { X509Certificate } from 'node:crypto';
10
10
 
11
11
  const isMainThread: boolean;
12
12
  const parentPort: null | MessagePort;
node/zlib.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'zlib' {
2
- import * as stream from 'stream';
2
+ import * as stream from 'node:stream';
3
3
 
4
4
  interface ZlibOptions {
5
5
  /**
node/util/types.d.ts DELETED
@@ -1,57 +0,0 @@
1
- declare module 'util/types' {
2
- function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
3
- function isArgumentsObject(object: unknown): object is IArguments;
4
- function isArrayBuffer(object: unknown): object is ArrayBuffer;
5
- function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
6
- function isAsyncFunction(object: unknown): boolean;
7
- function isBigInt64Array(value: unknown): value is BigInt64Array;
8
- function isBigUint64Array(value: unknown): value is BigUint64Array;
9
- function isBooleanObject(object: unknown): object is Boolean;
10
- function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
11
- function isDataView(object: unknown): object is DataView;
12
- function isDate(object: unknown): object is Date;
13
- function isExternal(object: unknown): boolean;
14
- function isFloat32Array(object: unknown): object is Float32Array;
15
- function isFloat64Array(object: unknown): object is Float64Array;
16
- function isGeneratorFunction(object: unknown): object is GeneratorFunction;
17
- function isGeneratorObject(object: unknown): object is Generator;
18
- function isInt8Array(object: unknown): object is Int8Array;
19
- function isInt16Array(object: unknown): object is Int16Array;
20
- function isInt32Array(object: unknown): object is Int32Array;
21
- function isMap<T>(
22
- object: T | {},
23
- ): object is T extends ReadonlyMap<any, any>
24
- ? unknown extends T
25
- ? never
26
- : ReadonlyMap<any, any>
27
- : Map<unknown, unknown>;
28
- function isMapIterator(object: unknown): boolean;
29
- function isModuleNamespaceObject(value: unknown): boolean;
30
- function isNativeError(object: unknown): object is Error;
31
- function isNumberObject(object: unknown): object is Number;
32
- function isPromise(object: unknown): object is Promise<unknown>;
33
- function isProxy(object: unknown): boolean;
34
- function isRegExp(object: unknown): object is RegExp;
35
- function isSet<T>(
36
- object: T | {},
37
- ): object is T extends ReadonlySet<any>
38
- ? unknown extends T
39
- ? never
40
- : ReadonlySet<any>
41
- : Set<unknown>;
42
- function isSetIterator(object: unknown): boolean;
43
- function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
44
- function isStringObject(object: unknown): object is String;
45
- function isSymbolObject(object: unknown): object is Symbol;
46
- function isTypedArray(object: unknown): object is NodeJS.TypedArray;
47
- function isUint8Array(object: unknown): object is Uint8Array;
48
- function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
49
- function isUint16Array(object: unknown): object is Uint16Array;
50
- function isUint32Array(object: unknown): object is Uint32Array;
51
- function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
52
- function isWeakSet(object: unknown): object is WeakSet<object>;
53
- }
54
-
55
- declare module 'node:util/types' {
56
- export * from 'util/types';
57
- }