@types/node 11.11.4 → 11.11.8

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/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
9
9
 
10
10
  Additional Details
11
- * Last updated: Tue, 19 Mar 2019 23:42:11 GMT
11
+ * Last updated: Tue, 26 Mar 2019 16:09:25 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
14
14
 
node/crypto.d.ts CHANGED
@@ -118,13 +118,15 @@ declare module "crypto" {
118
118
  type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
119
119
  type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
120
120
 
121
- interface Hash extends NodeJS.ReadWriteStream {
121
+ class Hash extends stream.Duplex {
122
+ private constructor();
122
123
  update(data: BinaryLike): Hash;
123
124
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash;
124
125
  digest(): Buffer;
125
126
  digest(encoding: HexBase64Latin1Encoding): string;
126
127
  }
127
- interface Hmac extends NodeJS.ReadWriteStream {
128
+ class Hmac extends stream.Duplex {
129
+ private constructor();
128
130
  update(data: BinaryLike): Hmac;
129
131
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
130
132
  digest(): Buffer;
@@ -133,7 +135,8 @@ declare module "crypto" {
133
135
 
134
136
  export type KeyObjectType = 'secret' | 'public' | 'private';
135
137
 
136
- interface KeyObject {
138
+ class KeyObject {
139
+ private constructor();
137
140
  asymmetricKeyType?: KeyType;
138
141
  export(options?: {
139
142
  type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1',
@@ -182,7 +185,8 @@ declare module "crypto" {
182
185
  algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions
183
186
  ): Cipher;
184
187
 
185
- interface Cipher extends NodeJS.ReadWriteStream {
188
+ class Cipher extends stream.Duplex {
189
+ private constructor();
186
190
  update(data: BinaryLike): Buffer;
187
191
  update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
188
192
  update(data: Binary, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string;
@@ -222,7 +226,8 @@ declare module "crypto" {
222
226
  ): DecipherGCM;
223
227
  function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
224
228
 
225
- interface Decipher extends NodeJS.ReadWriteStream {
229
+ class Decipher extends stream.Duplex {
230
+ private constructor();
226
231
  update(data: Binary): Buffer;
227
232
  update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
228
233
  update(data: Binary, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
@@ -268,7 +273,9 @@ declare module "crypto" {
268
273
 
269
274
  type KeyLike = string | Buffer | KeyObject;
270
275
 
271
- interface Signer extends NodeJS.WritableStream {
276
+ class Signer extends stream.Writable {
277
+ private constructor();
278
+
272
279
  update(data: BinaryLike): Signer;
273
280
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
274
281
  sign(private_key: SignPrivateKeyInput | KeyLike): Buffer;
@@ -276,11 +283,13 @@ declare module "crypto" {
276
283
  }
277
284
 
278
285
  function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
279
- interface Verify extends NodeJS.WritableStream {
286
+ class Verify extends stream.Writable {
287
+ private constructor();
288
+
280
289
  update(data: BinaryLike): Verify;
281
290
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
282
291
  verify(object: Object | KeyLike, signature: Binary): boolean;
283
- verify(object: Object | KeyLike, signature: string, signature_format: HexBase64Latin1Encoding): boolean;
292
+ verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean;
284
293
  // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
285
294
  // The signature field accepts a TypedArray type, but it is only available starting ES2017
286
295
  }
@@ -289,7 +298,8 @@ declare module "crypto" {
289
298
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
290
299
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Binary): DiffieHellman;
291
300
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman;
292
- interface DiffieHellman {
301
+ class DiffieHellman {
302
+ private constructor();
293
303
  generateKeys(): Buffer;
294
304
  generateKeys(encoding: HexBase64Latin1Encoding): string;
295
305
  computeSecret(other_public_key: Binary): Buffer;
@@ -368,6 +378,7 @@ declare module "crypto" {
368
378
  function getCurves(): string[];
369
379
  function getHashes(): string[];
370
380
  class ECDH {
381
+ private constructor();
371
382
  static convertKey(
372
383
  key: BinaryLike,
373
384
  curve: string,
node/http2.d.ts CHANGED
@@ -415,7 +415,7 @@ declare module "http2" {
415
415
  peerMaxConcurrentStreams?: number;
416
416
  selectPadding?: (frameLen: number, maxFrameLen: number) => number;
417
417
  settings?: Settings;
418
- createConnection?: (option: SessionOptions) => stream.Duplex;
418
+ createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
419
419
  }
420
420
 
421
421
  export type ClientSessionOptions = SessionOptions;
@@ -424,9 +424,7 @@ declare module "http2" {
424
424
  export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
425
425
  export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
426
426
 
427
- export interface ServerOptions extends ServerSessionOptions {
428
- allowHTTP1?: boolean;
429
- }
427
+ export interface ServerOptions extends ServerSessionOptions { }
430
428
 
431
429
  export interface SecureServerOptions extends SecureServerSessionOptions {
432
430
  allowHTTP1?: boolean;
node/index.d.ts CHANGED
@@ -92,4 +92,8 @@ declare module "util" {
92
92
  namespace promisify {
93
93
  const custom: symbol;
94
94
  }
95
+ namespace types {
96
+ function isBigInt64Array(value: any): boolean;
97
+ function isBigUint64Array(value: any): boolean;
98
+ }
95
99
  }
node/inspector.d.ts CHANGED
@@ -1716,10 +1716,31 @@ declare module "inspector" {
1716
1716
  awaitPromise?: boolean;
1717
1717
  }
1718
1718
 
1719
+ interface SetAsyncCallStackDepthParameterType {
1720
+ /**
1721
+ * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
1722
+ * call stacks (default).
1723
+ */
1724
+ maxDepth: number;
1725
+ }
1726
+
1719
1727
  interface SetCustomObjectFormatterEnabledParameterType {
1720
1728
  enabled: boolean;
1721
1729
  }
1722
1730
 
1731
+ interface SetMaxCallStackSizeToCaptureParameterType {
1732
+ size: number;
1733
+ }
1734
+
1735
+ interface AddBindingParameterType {
1736
+ name: string;
1737
+ executionContextId?: ExecutionContextId;
1738
+ }
1739
+
1740
+ interface RemoveBindingParameterType {
1741
+ name: string;
1742
+ }
1743
+
1723
1744
  interface AwaitPromiseReturnType {
1724
1745
  /**
1725
1746
  * Promise result. Will contain rejected value if promise was rejected.
@@ -1819,6 +1840,15 @@ declare module "inspector" {
1819
1840
  exceptionDetails?: ExceptionDetails;
1820
1841
  }
1821
1842
 
1843
+ interface BindingCalledEventDataType {
1844
+ name: string;
1845
+ payload: string;
1846
+ /**
1847
+ * Identifier of the context where the call was made.
1848
+ */
1849
+ executionContextId: ExecutionContextId;
1850
+ }
1851
+
1822
1852
  interface ConsoleAPICalledEventDataType {
1823
1853
  /**
1824
1854
  * Type of the call.
@@ -2435,12 +2465,24 @@ declare module "inspector" {
2435
2465
  post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
2436
2466
  post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
2437
2467
 
2468
+ /**
2469
+ * Enables or disables async call stacks tracking.
2470
+ */
2471
+ post(method: "Runtime.setAsyncCallStackDepth", params?: Runtime.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
2472
+ post(method: "Runtime.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
2473
+
2438
2474
  /**
2439
2475
  * @experimental
2440
2476
  */
2441
2477
  post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
2442
2478
  post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
2443
2479
 
2480
+ /**
2481
+ * @experimental
2482
+ */
2483
+ post(method: "Runtime.setMaxCallStackSizeToCapture", params?: Runtime.SetMaxCallStackSizeToCaptureParameterType, callback?: (err: Error | null) => void): void;
2484
+ post(method: "Runtime.setMaxCallStackSizeToCapture", callback?: (err: Error | null) => void): void;
2485
+
2444
2486
  /**
2445
2487
  * Terminate current or next JavaScript execution.
2446
2488
  * Will cancel the termination when the outer-most script execution ends.
@@ -2448,6 +2490,28 @@ declare module "inspector" {
2448
2490
  */
2449
2491
  post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void;
2450
2492
 
2493
+ /**
2494
+ * If executionContextId is empty, adds binding with the given name on the
2495
+ * global objects of all inspected contexts, including those created later,
2496
+ * bindings survive reloads.
2497
+ * If executionContextId is specified, adds binding only on global object of
2498
+ * given execution context.
2499
+ * Binding function takes exactly one argument, this argument should be string,
2500
+ * in case of any other input, function throws an exception.
2501
+ * Each binding function call produces Runtime.bindingCalled notification.
2502
+ * @experimental
2503
+ */
2504
+ post(method: "Runtime.addBinding", params?: Runtime.AddBindingParameterType, callback?: (err: Error | null) => void): void;
2505
+ post(method: "Runtime.addBinding", callback?: (err: Error | null) => void): void;
2506
+
2507
+ /**
2508
+ * This method does not remove binding function from global object but
2509
+ * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
2510
+ * @experimental
2511
+ */
2512
+ post(method: "Runtime.removeBinding", params?: Runtime.RemoveBindingParameterType, callback?: (err: Error | null) => void): void;
2513
+ post(method: "Runtime.removeBinding", callback?: (err: Error | null) => void): void;
2514
+
2451
2515
  /**
2452
2516
  * Returns supported domains.
2453
2517
  */
@@ -2551,6 +2615,12 @@ declare module "inspector" {
2551
2615
  */
2552
2616
  addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2553
2617
 
2618
+ /**
2619
+ * Notification is issued every time when binding is called.
2620
+ * @experimental
2621
+ */
2622
+ addListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
2623
+
2554
2624
  /**
2555
2625
  * Issued when console API was called.
2556
2626
  */
@@ -2629,6 +2699,7 @@ declare module "inspector" {
2629
2699
  emit(event: "HeapProfiler.resetProfiles"): boolean;
2630
2700
  emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
2631
2701
  emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
2702
+ emit(event: "Runtime.bindingCalled", message: InspectorNotification<Runtime.BindingCalledEventDataType>): boolean;
2632
2703
  emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
2633
2704
  emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
2634
2705
  emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
@@ -2703,6 +2774,12 @@ declare module "inspector" {
2703
2774
  */
2704
2775
  on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2705
2776
 
2777
+ /**
2778
+ * Notification is issued every time when binding is called.
2779
+ * @experimental
2780
+ */
2781
+ on(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
2782
+
2706
2783
  /**
2707
2784
  * Issued when console API was called.
2708
2785
  */
@@ -2827,6 +2904,12 @@ declare module "inspector" {
2827
2904
  */
2828
2905
  once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2829
2906
 
2907
+ /**
2908
+ * Notification is issued every time when binding is called.
2909
+ * @experimental
2910
+ */
2911
+ once(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
2912
+
2830
2913
  /**
2831
2914
  * Issued when console API was called.
2832
2915
  */
@@ -2951,6 +3034,12 @@ declare module "inspector" {
2951
3034
  */
2952
3035
  prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2953
3036
 
3037
+ /**
3038
+ * Notification is issued every time when binding is called.
3039
+ * @experimental
3040
+ */
3041
+ prependListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
3042
+
2954
3043
  /**
2955
3044
  * Issued when console API was called.
2956
3045
  */
@@ -3075,6 +3164,12 @@ declare module "inspector" {
3075
3164
  */
3076
3165
  prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
3077
3166
 
3167
+ /**
3168
+ * Notification is issued every time when binding is called.
3169
+ * @experimental
3170
+ */
3171
+ prependOnceListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
3172
+
3078
3173
  /**
3079
3174
  * Issued when console API was called.
3080
3175
  */
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "11.11.4",
3
+ "version": "11.11.8",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -206,6 +206,6 @@
206
206
  },
207
207
  "scripts": {},
208
208
  "dependencies": {},
209
- "typesPublisherContentHash": "3ae8881053042a07e21a9cb17e6ca7dc2bd3d90f72ee0923d652dcb7455aa64e",
209
+ "typesPublisherContentHash": "8023382f44f0b3465f2d9182e61febc5c6e525800eaad1777475b56269a7dceb",
210
210
  "typeScriptVersion": "2.0"
211
211
  }
node/ts3.2/util.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  // tslint:disable-next-line:no-bad-reference
2
2
  /// <reference path="../util.d.ts" />
3
+
3
4
  declare module "util" {
4
5
  namespace inspect {
5
6
  const custom: unique symbol;
@@ -7,4 +8,8 @@ declare module "util" {
7
8
  namespace promisify {
8
9
  const custom: unique symbol;
9
10
  }
11
+ namespace types {
12
+ function isBigInt64Array(value: any): value is BigInt64Array;
13
+ function isBigUint64Array(value: any): value is BigUint64Array;
14
+ }
10
15
  }
node/util.d.ts CHANGED
@@ -114,7 +114,7 @@ declare module "util" {
114
114
  function isArrayBuffer(object: any): object is ArrayBuffer;
115
115
  function isAsyncFunction(object: any): boolean;
116
116
  function isBooleanObject(object: any): object is Boolean;
117
- function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* BigInt */);
117
+ function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */);
118
118
  function isDataView(object: any): object is DataView;
119
119
  function isDate(object: any): object is Date;
120
120
  function isExternal(object: any): boolean;
@@ -127,6 +127,7 @@ declare module "util" {
127
127
  function isInt32Array(object: any): object is Int32Array;
128
128
  function isMap(object: any): boolean;
129
129
  function isMapIterator(object: any): boolean;
130
+ function isModuleNamespaceObject(value: any): boolean;
130
131
  function isNativeError(object: any): object is Error;
131
132
  function isNumberObject(object: any): object is Number;
132
133
  function isPromise(object: any): boolean;