@types/node 12.19.5 → 12.19.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.
node v12.19/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v12.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 17 Nov 2020 23:36:47 GMT
11
+ * Last updated: Sat, 12 Dec 2020 17:18:23 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node v12.19/assert.d.ts CHANGED
@@ -15,6 +15,7 @@ declare module 'assert' {
15
15
  actual?: any;
16
16
  expected?: any;
17
17
  operator?: string;
18
+ // tslint:disable-next-line:ban-types
18
19
  stackStartFn?: Function;
19
20
  });
20
21
  }
@@ -37,6 +38,8 @@ declare module 'assert' {
37
38
  stack: object;
38
39
  }
39
40
 
41
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
42
+
40
43
  function fail(message?: string | Error): never;
41
44
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
42
45
  function fail(
@@ -44,6 +47,7 @@ declare module 'assert' {
44
47
  expected: any,
45
48
  message?: string | Error,
46
49
  operator?: string,
50
+ // tslint:disable-next-line:ban-types
47
51
  stackStartFn?: Function,
48
52
  ): never;
49
53
  function ok(value: any, message?: string | Error): asserts value;
@@ -61,22 +65,22 @@ declare module 'assert' {
61
65
  function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
62
66
 
63
67
  function throws(block: () => any, message?: string | Error): void;
64
- function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
68
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
65
69
  function doesNotThrow(block: () => any, message?: string | Error): void;
66
- function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
70
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
67
71
 
68
72
  function ifError(value: any): asserts value is null | undefined;
69
73
 
70
74
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
71
75
  function rejects(
72
76
  block: (() => Promise<any>) | Promise<any>,
73
- error: RegExp | Function | Object | Error,
77
+ error: AssertPredicate,
74
78
  message?: string | Error,
75
79
  ): Promise<void>;
76
80
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
77
81
  function doesNotReject(
78
82
  block: (() => Promise<any>) | Promise<any>,
79
- error: RegExp | Function,
83
+ error: AssertPredicate,
80
84
  message?: string | Error,
81
85
  ): Promise<void>;
82
86
 
@@ -865,7 +865,7 @@ declare namespace NodeJS {
865
865
  argv0: string;
866
866
  execArgv: string[];
867
867
  execPath: string;
868
- abort(): void;
868
+ abort(): never;
869
869
  chdir(directory: string): void;
870
870
  cwd(): string;
871
871
  debugPort: number;
@@ -1200,6 +1200,17 @@ declare namespace NodeJS {
1200
1200
  [key: string]: T | undefined;
1201
1201
  }
1202
1202
 
1203
- type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
1203
+ type TypedArray =
1204
+ | Uint8Array
1205
+ | Uint8ClampedArray
1206
+ | Uint16Array
1207
+ | Uint32Array
1208
+ | Int8Array
1209
+ | Int16Array
1210
+ | Int32Array
1211
+ | BigUint64Array
1212
+ | BigInt64Array
1213
+ | Float32Array
1214
+ | Float64Array;
1204
1215
  type ArrayBufferView = TypedArray | DataView;
1205
1216
  }
node v12.19/http.d.ts CHANGED
@@ -173,7 +173,7 @@ declare module "http" {
173
173
  rawHeaders: string[];
174
174
  }
175
175
 
176
- // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
176
+ // https://github.com/nodejs/node/blob/v12.20.0/lib/_http_client.js#L85
177
177
  class ClientRequest extends OutgoingMessage {
178
178
  connection: Socket;
179
179
  socket: Socket;
@@ -183,6 +183,7 @@ declare module "http" {
183
183
 
184
184
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
185
185
 
186
+ method: string;
186
187
  readonly path: string;
187
188
  abort(): void;
188
189
  onSocket(socket: Socket): void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.19.5",
3
+ "version": "12.19.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -231,6 +231,6 @@
231
231
  },
232
232
  "scripts": {},
233
233
  "dependencies": {},
234
- "typesPublisherContentHash": "95f16b55a37c1df11f230216c9794d5376385e6f501f8feffed2189fca2f934c",
235
- "typeScriptVersion": "3.2"
234
+ "typesPublisherContentHash": "db8bba5ca7d640f7451891779e5e692a6cf1b3b86cbcb4f34737a0e8817cb049",
235
+ "typeScriptVersion": "3.3"
236
236
  }
@@ -15,6 +15,7 @@ declare module 'assert' {
15
15
  actual?: any;
16
16
  expected?: any;
17
17
  operator?: string;
18
+ // tslint:disable-next-line:ban-types
18
19
  stackStartFn?: Function;
19
20
  });
20
21
  }
@@ -37,6 +38,8 @@ declare module 'assert' {
37
38
  stack: object;
38
39
  }
39
40
 
41
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
42
+
40
43
  function fail(message?: string | Error): never;
41
44
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
42
45
  function fail(
@@ -44,6 +47,7 @@ declare module 'assert' {
44
47
  expected: any,
45
48
  message?: string | Error,
46
49
  operator?: string,
50
+ // tslint:disable-next-line:ban-types
47
51
  stackStartFn?: Function,
48
52
  ): never;
49
53
  function ok(value: any, message?: string | Error): void;
@@ -61,22 +65,22 @@ declare module 'assert' {
61
65
  function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
62
66
 
63
67
  function throws(block: () => any, message?: string | Error): void;
64
- function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
68
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
65
69
  function doesNotThrow(block: () => any, message?: string | Error): void;
66
- function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
70
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
67
71
 
68
72
  function ifError(value: any): void;
69
73
 
70
74
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
71
75
  function rejects(
72
76
  block: (() => Promise<any>) | Promise<any>,
73
- error: RegExp | Function | Object | Error,
77
+ error: AssertPredicate,
74
78
  message?: string | Error,
75
79
  ): Promise<void>;
76
80
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
77
81
  function doesNotReject(
78
82
  block: (() => Promise<any>) | Promise<any>,
79
- error: RegExp | Function,
83
+ error: AssertPredicate,
80
84
  message?: string | Error,
81
85
  ): Promise<void>;
82
86
 
node v12.19/util.d.ts CHANGED
@@ -111,45 +111,58 @@ declare module "util" {
111
111
  }
112
112
 
113
113
  namespace types {
114
- function isAnyArrayBuffer(object: any): boolean;
114
+ function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
115
115
  function isArgumentsObject(object: any): object is IArguments;
116
116
  function isArrayBuffer(object: any): object is ArrayBuffer;
117
- function isArrayBufferView(object: any): object is ArrayBufferView;
117
+ function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
118
118
  function isAsyncFunction(object: any): boolean;
119
119
  function isBigInt64Array(value: any): value is BigInt64Array;
120
120
  function isBigUint64Array(value: any): value is BigUint64Array;
121
121
  function isBooleanObject(object: any): object is Boolean;
122
- function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */);
122
+ function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
123
123
  function isDataView(object: any): object is DataView;
124
124
  function isDate(object: any): object is Date;
125
125
  function isExternal(object: any): boolean;
126
126
  function isFloat32Array(object: any): object is Float32Array;
127
127
  function isFloat64Array(object: any): object is Float64Array;
128
- function isGeneratorFunction(object: any): boolean;
129
- function isGeneratorObject(object: any): boolean;
128
+ function isGeneratorFunction(object: any): object is GeneratorFunction;
129
+ function isGeneratorObject(object: any): object is Generator;
130
130
  function isInt8Array(object: any): object is Int8Array;
131
131
  function isInt16Array(object: any): object is Int16Array;
132
132
  function isInt32Array(object: any): object is Int32Array;
133
- function isMap(object: any): boolean;
133
+ function isMap<T>(
134
+ object: T | {},
135
+ ): object is T extends ReadonlyMap<any, any>
136
+ ? unknown extends T
137
+ ? never
138
+ : ReadonlyMap<any, any>
139
+ : Map<any, any>;
134
140
  function isMapIterator(object: any): boolean;
135
141
  function isModuleNamespaceObject(value: any): boolean;
136
142
  function isNativeError(object: any): object is Error;
137
143
  function isNumberObject(object: any): object is Number;
138
- function isPromise(object: any): boolean;
144
+ function isPromise(object: any): object is Promise<any>;
139
145
  function isProxy(object: any): boolean;
140
146
  function isRegExp(object: any): object is RegExp;
141
- function isSet(object: any): boolean;
147
+ function isSet<T>(
148
+ object: T | {},
149
+ ): object is T extends ReadonlySet<any>
150
+ ? unknown extends T
151
+ ? never
152
+ : ReadonlySet<any>
153
+ : Set<any>;
142
154
  function isSetIterator(object: any): boolean;
143
- function isSharedArrayBuffer(object: any): boolean;
144
- function isStringObject(object: any): boolean;
145
- function isSymbolObject(object: any): boolean;
155
+ function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
156
+ function isStringObject(object: any): object is String;
157
+ function isSymbolObject(object: any): object is Symbol;
146
158
  function isTypedArray(object: any): object is NodeJS.TypedArray;
147
159
  function isUint8Array(object: any): object is Uint8Array;
148
160
  function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
149
161
  function isUint16Array(object: any): object is Uint16Array;
150
162
  function isUint32Array(object: any): object is Uint32Array;
151
- function isWeakMap(object: any): boolean;
152
- function isWeakSet(object: any): boolean;
163
+ function isWeakMap(object: any): object is WeakMap<any, any>;
164
+ function isWeakSet(object: any): object is WeakSet<any>;
165
+ /** @deprecated Removed in v14.0.0 */
153
166
  function isWebAssemblyCompiledModule(object: any): boolean;
154
167
  }
155
168