@types/node 10.11.4 → 10.12.0

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/LICENSE +21 -21
  2. node/README.md +1 -1
  3. node/index.d.ts +172 -25
  4. node/package.json +3 -2
node/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
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: Wed, 03 Oct 2018 17:56:18 GMT
11
+ * Last updated: Mon, 15 Oct 2018 23:08:10 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
14
14
 
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for Node.js 10.11
1
+ // Type definitions for Node.js 10.12
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -108,6 +108,10 @@ interface Console {
108
108
  * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
109
109
  */
110
110
  timeEnd(label?: string): void;
111
+ /**
112
+ * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
113
+ */
114
+ timeLog(label: string, ...data: any[]): void;
111
115
  /**
112
116
  * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
113
117
  */
@@ -154,7 +158,7 @@ interface ErrorConstructor {
154
158
  stackTraceLimit: number;
155
159
  }
156
160
 
157
- // compat for TypeScript 1.8
161
+ // compat for TypeScript 1.8 and default es5 target
158
162
  // if you use with --target es3 or --target es5 and use below definitions,
159
163
  // use the lib.es6.d.ts that is bundled with TypeScript 1.8.
160
164
  interface MapConstructor { }
@@ -162,6 +166,9 @@ interface WeakMapConstructor { }
162
166
  interface SetConstructor { }
163
167
  interface WeakSetConstructor { }
164
168
 
169
+ interface Set<T> {}
170
+ interface ReadonlySet<T> {}
171
+
165
172
  // Forward-declare needed types from lib.es2015.d.ts (in case users are using `--lib es5`)
166
173
  interface Iterable<T> { }
167
174
  interface Iterator<T> {
@@ -200,20 +207,20 @@ declare var console: Console;
200
207
  declare var __filename: string;
201
208
  declare var __dirname: string;
202
209
 
203
- declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
210
+ declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
204
211
  declare namespace setTimeout {
205
212
  function __promisify__(ms: number): Promise<void>;
206
213
  function __promisify__<T>(ms: number, value: T): Promise<T>;
207
214
  }
208
- declare function clearTimeout(timeoutId: NodeJS.Timer): void;
209
- declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
210
- declare function clearInterval(intervalId: NodeJS.Timer): void;
211
- declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
215
+ declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
216
+ declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
217
+ declare function clearInterval(intervalId: NodeJS.Timeout): void;
218
+ declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
212
219
  declare namespace setImmediate {
213
220
  function __promisify__(): Promise<void>;
214
221
  function __promisify__<T>(value: T): Promise<T>;
215
222
  }
216
- declare function clearImmediate(immediateId: any): void;
223
+ declare function clearImmediate(immediateId: NodeJS.Immediate): void;
217
224
 
218
225
  // TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
219
226
  interface NodeRequireFunction {
@@ -486,6 +493,7 @@ declare namespace NodeJS {
486
493
  maxArrayLength?: number | null;
487
494
  breakLength?: number;
488
495
  compact?: boolean;
496
+ sorted?: boolean | ((a: string, b: string) => number);
489
497
  }
490
498
 
491
499
  interface ConsoleConstructor {
@@ -684,6 +692,8 @@ declare namespace NodeJS {
684
692
  "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
685
693
  "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
686
694
 
695
+ type MultipleResolveType = 'resolve' | 'reject';
696
+
687
697
  type BeforeExitListener = (code: number) => void;
688
698
  type DisconnectListener = () => void;
689
699
  type ExitListener = (code: number) => void;
@@ -695,6 +705,7 @@ declare namespace NodeJS {
695
705
  type SignalsListener = (signal: Signals) => void;
696
706
  type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
697
707
  type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
708
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
698
709
 
699
710
  interface Socket extends ReadWriteStream {
700
711
  isTTY?: true;
@@ -811,8 +822,7 @@ declare namespace NodeJS {
811
822
  * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][]
812
823
  * environment variable.
813
824
  */
814
- // TODO: This Set is readonly
815
- allowedNodeEnvironmentFlags: Set<string>;
825
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
816
826
 
817
827
  /**
818
828
  * EventEmitter
@@ -839,6 +849,7 @@ declare namespace NodeJS {
839
849
  addListener(event: Signals, listener: SignalsListener): this;
840
850
  addListener(event: "newListener", listener: NewListenerListener): this;
841
851
  addListener(event: "removeListener", listener: RemoveListenerListener): this;
852
+ addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
842
853
 
843
854
  emit(event: "beforeExit", code: number): boolean;
844
855
  emit(event: "disconnect"): boolean;
@@ -851,6 +862,7 @@ declare namespace NodeJS {
851
862
  emit(event: Signals, signal: Signals): boolean;
852
863
  emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this;
853
864
  emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this;
865
+ emit(event: "multipleResolves", listener: MultipleResolveListener): this;
854
866
 
855
867
  on(event: "beforeExit", listener: BeforeExitListener): this;
856
868
  on(event: "disconnect", listener: DisconnectListener): this;
@@ -863,6 +875,7 @@ declare namespace NodeJS {
863
875
  on(event: Signals, listener: SignalsListener): this;
864
876
  on(event: "newListener", listener: NewListenerListener): this;
865
877
  on(event: "removeListener", listener: RemoveListenerListener): this;
878
+ on(event: "multipleResolves", listener: MultipleResolveListener): this;
866
879
 
867
880
  once(event: "beforeExit", listener: BeforeExitListener): this;
868
881
  once(event: "disconnect", listener: DisconnectListener): this;
@@ -875,6 +888,7 @@ declare namespace NodeJS {
875
888
  once(event: Signals, listener: SignalsListener): this;
876
889
  once(event: "newListener", listener: NewListenerListener): this;
877
890
  once(event: "removeListener", listener: RemoveListenerListener): this;
891
+ once(event: "multipleResolves", listener: MultipleResolveListener): this;
878
892
 
879
893
  prependListener(event: "beforeExit", listener: BeforeExitListener): this;
880
894
  prependListener(event: "disconnect", listener: DisconnectListener): this;
@@ -887,6 +901,7 @@ declare namespace NodeJS {
887
901
  prependListener(event: Signals, listener: SignalsListener): this;
888
902
  prependListener(event: "newListener", listener: NewListenerListener): this;
889
903
  prependListener(event: "removeListener", listener: RemoveListenerListener): this;
904
+ prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
890
905
 
891
906
  prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
892
907
  prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
@@ -899,6 +914,7 @@ declare namespace NodeJS {
899
914
  prependOnceListener(event: Signals, listener: SignalsListener): this;
900
915
  prependOnceListener(event: "newListener", listener: NewListenerListener): this;
901
916
  prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this;
917
+ prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
902
918
 
903
919
  listeners(event: "beforeExit"): BeforeExitListener[];
904
920
  listeners(event: "disconnect"): DisconnectListener[];
@@ -911,6 +927,7 @@ declare namespace NodeJS {
911
927
  listeners(event: Signals): SignalsListener[];
912
928
  listeners(event: "newListener"): NewListenerListener[];
913
929
  listeners(event: "removeListener"): RemoveListenerListener[];
930
+ listeners(event: "multipleResolves"): MultipleResolveListener[];
914
931
  }
915
932
 
916
933
  interface Global {
@@ -953,9 +970,9 @@ declare namespace NodeJS {
953
970
  Uint8ClampedArray: Function;
954
971
  WeakMap: WeakMapConstructor;
955
972
  WeakSet: WeakSetConstructor;
956
- clearImmediate: (immediateId: any) => void;
957
- clearInterval: (intervalId: Timer) => void;
958
- clearTimeout: (timeoutId: Timer) => void;
973
+ clearImmediate: (immediateId: Immediate) => void;
974
+ clearInterval: (intervalId: Timeout) => void;
975
+ clearTimeout: (timeoutId: Timeout) => void;
959
976
  console: typeof console;
960
977
  decodeURI: typeof decodeURI;
961
978
  decodeURIComponent: typeof decodeURIComponent;
@@ -970,9 +987,9 @@ declare namespace NodeJS {
970
987
  parseInt: typeof parseInt;
971
988
  process: Process;
972
989
  root: Global;
973
- setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => any;
974
- setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timer;
975
- setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timer;
990
+ setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
991
+ setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
992
+ setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
976
993
  undefined: typeof undefined;
977
994
  unescape: (str: string) => string;
978
995
  gc: () => void;
@@ -980,13 +997,27 @@ declare namespace NodeJS {
980
997
  }
981
998
 
982
999
  interface Timer {
1000
+ ref(): void;
1001
+ refresh(): void;
1002
+ unref(): void;
1003
+ }
1004
+
1005
+ class Immediate {
983
1006
  ref(): void;
984
1007
  unref(): void;
1008
+ _onImmediate: Function; // to distinguish it from the Timeout class
1009
+ }
1010
+
1011
+ class Timeout implements Timer {
1012
+ ref(): void;
1013
+ refresh(): void;
1014
+ unref(): void;
985
1015
  }
986
1016
 
987
1017
  class Module {
988
1018
  static runMain(): void;
989
1019
  static wrap(code: string): string;
1020
+ static createRequireFromPath(path: string): (path: string) => any;
990
1021
  static builtinModules: string[];
991
1022
 
992
1023
  static Module: typeof Module;
@@ -2599,6 +2630,20 @@ declare module "url" {
2599
2630
  function domainToASCII(domain: string): string;
2600
2631
  function domainToUnicode(domain: string): string;
2601
2632
 
2633
+ /**
2634
+ * This function ensures the correct decodings of percent-encoded characters as
2635
+ * well as ensuring a cross-platform valid absolute path string.
2636
+ * @param url The file URL string or URL object to convert to a path.
2637
+ */
2638
+ function fileURLToPath(url: string | URL): string;
2639
+
2640
+ /**
2641
+ * This function ensures that path is resolved absolutely, and that the URL
2642
+ * control characters are correctly encoded when converting into a File URL.
2643
+ * @param url The path to convert to a File URL.
2644
+ */
2645
+ function pathToFileURL(url: string): URL;
2646
+
2602
2647
  interface URLFormatOptions {
2603
2648
  auth?: boolean;
2604
2649
  fragment?: boolean;
@@ -2651,6 +2696,7 @@ declare module "dns" {
2651
2696
  family?: number;
2652
2697
  hints?: number;
2653
2698
  all?: boolean;
2699
+ verbatim?: boolean;
2654
2700
  }
2655
2701
 
2656
2702
  interface LookupOneOptions extends LookupOptions {
@@ -3974,12 +4020,25 @@ declare module "fs" {
3974
4020
  */
3975
4021
  function rmdirSync(path: PathLike): void;
3976
4022
 
4023
+ export interface MakeDirectoryOptions {
4024
+ /**
4025
+ * Indicates whether parent folders should be created.
4026
+ * @default false
4027
+ */
4028
+ recursive?: boolean;
4029
+ /**
4030
+ * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
4031
+ * @default 0o777.
4032
+ */
4033
+ mode?: number;
4034
+ }
4035
+
3977
4036
  /**
3978
4037
  * Asynchronous mkdir(2) - create a directory.
3979
4038
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
3980
4039
  * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
3981
4040
  */
3982
- function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
4041
+ function mkdir(path: PathLike, mode: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
3983
4042
 
3984
4043
  /**
3985
4044
  * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
@@ -3994,7 +4053,7 @@ declare module "fs" {
3994
4053
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
3995
4054
  * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
3996
4055
  */
3997
- function __promisify__(path: PathLike, mode?: number | string | null): Promise<void>;
4056
+ function __promisify__(path: PathLike, mode?: number | string | MakeDirectoryOptions | null): Promise<void>;
3998
4057
  }
3999
4058
 
4000
4059
  /**
@@ -4002,7 +4061,7 @@ declare module "fs" {
4002
4061
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
4003
4062
  * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
4004
4063
  */
4005
- function mkdirSync(path: PathLike, mode?: number | string | null): void;
4064
+ function mkdirSync(path: PathLike, mode?: number | string | MakeDirectoryOptions | null): void;
4006
4065
 
4007
4066
  /**
4008
4067
  * Asynchronously creates a unique temporary directory.
@@ -6329,6 +6388,88 @@ declare module "crypto" {
6329
6388
  function timingSafeEqual(a: Buffer | NodeJS.TypedArray | DataView, b: Buffer | NodeJS.TypedArray | DataView): boolean;
6330
6389
  /** @deprecated since v10.0.0 */
6331
6390
  const DEFAULT_ENCODING: string;
6391
+
6392
+ export type KeyType = 'rsa' | 'dsa' | 'ec';
6393
+ export type KeyFormat = 'pem' | 'der';
6394
+
6395
+ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
6396
+ format: T;
6397
+ ciper: string;
6398
+ passphrase: string;
6399
+ }
6400
+
6401
+ interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
6402
+ /**
6403
+ * Key size in bits
6404
+ */
6405
+ modulusLength: number;
6406
+ /**
6407
+ * @default 0x10001
6408
+ */
6409
+ publicExponent?: number;
6410
+
6411
+ publicKeyEncoding: {
6412
+ type: 'pkcs1' | 'spki';
6413
+ format: PubF;
6414
+ };
6415
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
6416
+ type: 'pkcs1' | 'pkcs8';
6417
+ };
6418
+ }
6419
+
6420
+ interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
6421
+ /**
6422
+ * Key size in bits
6423
+ */
6424
+ modulusLength: number;
6425
+ /**
6426
+ * Size of q in bits
6427
+ */
6428
+ divisorLength: number;
6429
+
6430
+ publicKeyEncoding: {
6431
+ type: 'spki';
6432
+ format: PubF;
6433
+ };
6434
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
6435
+ type: 'pkcs8';
6436
+ };
6437
+ }
6438
+
6439
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
6440
+ /**
6441
+ * Name of the curve to use.
6442
+ */
6443
+ namedCurve: string;
6444
+
6445
+ publicKeyEncoding: {
6446
+ type: 'pkcs1' | 'spki';
6447
+ format: PubF;
6448
+ };
6449
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
6450
+ type: 'sec1' | 'pkcs8';
6451
+ };
6452
+ }
6453
+
6454
+ interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
6455
+ publicKey: T1;
6456
+ privateKey: T2;
6457
+ }
6458
+
6459
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
6460
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
6461
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
6462
+ function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
6463
+
6464
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
6465
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
6466
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
6467
+ function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
6468
+
6469
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
6470
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
6471
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
6472
+ function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
6332
6473
  }
6333
6474
 
6334
6475
  declare module "stream" {
@@ -7204,20 +7345,20 @@ declare module "v8" {
7204
7345
  }
7205
7346
 
7206
7347
  declare module "timers" {
7207
- function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
7348
+ function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
7208
7349
  namespace setTimeout {
7209
7350
  function __promisify__(ms: number): Promise<void>;
7210
7351
  function __promisify__<T>(ms: number, value: T): Promise<T>;
7211
7352
  }
7212
- function clearTimeout(timeoutId: NodeJS.Timer): void;
7213
- function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
7214
- function clearInterval(intervalId: NodeJS.Timer): void;
7215
- function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
7353
+ function clearTimeout(timeoutId: NodeJS.Timeout): void;
7354
+ function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
7355
+ function clearInterval(intervalId: NodeJS.Timeout): void;
7356
+ function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
7216
7357
  namespace setImmediate {
7217
7358
  function __promisify__(): Promise<void>;
7218
7359
  function __promisify__<T>(value: T): Promise<T>;
7219
7360
  }
7220
- function clearImmediate(immediateId: any): void;
7361
+ function clearImmediate(immediateId: NodeJS.Immediate): void;
7221
7362
  }
7222
7363
 
7223
7364
  declare module "console" {
@@ -7645,6 +7786,7 @@ declare module "http2" {
7645
7786
  addListener(event: "localSettings", listener: (settings: Settings) => void): this;
7646
7787
  addListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
7647
7788
  addListener(event: "timeout", listener: () => void): this;
7789
+ addListener(event: "ping", listener: () => void): this;
7648
7790
 
7649
7791
  emit(event: string | symbol, ...args: any[]): boolean;
7650
7792
  emit(event: "close"): boolean;
@@ -7654,6 +7796,7 @@ declare module "http2" {
7654
7796
  emit(event: "localSettings", settings: Settings): boolean;
7655
7797
  emit(event: "remoteSettings", settings: Settings): boolean;
7656
7798
  emit(event: "timeout"): boolean;
7799
+ emit(event: "ping"): boolean;
7657
7800
 
7658
7801
  on(event: string, listener: (...args: any[]) => void): this;
7659
7802
  on(event: "close", listener: () => void): this;
@@ -7663,6 +7806,7 @@ declare module "http2" {
7663
7806
  on(event: "localSettings", listener: (settings: Settings) => void): this;
7664
7807
  on(event: "remoteSettings", listener: (settings: Settings) => void): this;
7665
7808
  on(event: "timeout", listener: () => void): this;
7809
+ on(event: "ping", listener: () => void): this;
7666
7810
 
7667
7811
  once(event: string, listener: (...args: any[]) => void): this;
7668
7812
  once(event: "close", listener: () => void): this;
@@ -7672,6 +7816,7 @@ declare module "http2" {
7672
7816
  once(event: "localSettings", listener: (settings: Settings) => void): this;
7673
7817
  once(event: "remoteSettings", listener: (settings: Settings) => void): this;
7674
7818
  once(event: "timeout", listener: () => void): this;
7819
+ once(event: "ping", listener: () => void): this;
7675
7820
 
7676
7821
  prependListener(event: string, listener: (...args: any[]) => void): this;
7677
7822
  prependListener(event: "close", listener: () => void): this;
@@ -7681,6 +7826,7 @@ declare module "http2" {
7681
7826
  prependListener(event: "localSettings", listener: (settings: Settings) => void): this;
7682
7827
  prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
7683
7828
  prependListener(event: "timeout", listener: () => void): this;
7829
+ prependListener(event: "ping", listener: () => void): this;
7684
7830
 
7685
7831
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
7686
7832
  prependOnceListener(event: "close", listener: () => void): this;
@@ -7690,6 +7836,7 @@ declare module "http2" {
7690
7836
  prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;
7691
7837
  prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
7692
7838
  prependOnceListener(event: "timeout", listener: () => void): this;
7839
+ prependOnceListener(event: "ping", listener: () => void): this;
7693
7840
  }
7694
7841
 
7695
7842
  export interface ClientHttp2Session extends Http2Session {
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "10.11.4",
3
+ "version": "10.12.0",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -156,12 +156,13 @@
156
156
  }
157
157
  ],
158
158
  "main": "",
159
+ "types": "",
159
160
  "repository": {
160
161
  "type": "git",
161
162
  "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
162
163
  },
163
164
  "scripts": {},
164
165
  "dependencies": {},
165
- "typesPublisherContentHash": "6ad95e0ee431633ec56afa19c8363edf75e0dff9e7b5b0b25423a84dd4a62266",
166
+ "typesPublisherContentHash": "2f0ee5caa77d69f14900c2f28db9d6901f1c038af748af32f60256f9ba8202f2",
166
167
  "typeScriptVersion": "2.0"
167
168
  }