@types/node 10.11.3 → 10.11.7

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 +2 -2
  3. node/index.d.ts +50 -28
  4. node/package.json +2 -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,9 +8,9 @@ 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: Fri, 28 Sep 2018 21:44:24 GMT
11
+ * Last updated: Wed, 10 Oct 2018 17:39:25 GMT
12
12
  * Dependencies: none
13
- * Global values: Buffer, NodeJS, SlowBuffer, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
13
+ * Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
14
14
 
15
15
  # Credits
16
16
  These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Huw <https://github.com/hoo29>, Kelvin Jin <https://github.com/kjin>, Klaus Meinhardt <https://github.com/ajafff>, Lishude <https://github.com/islishude>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, Matthieu Sieben <https://github.com/matthieusieben>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, Parambir Singh <https://github.com/parambirs>, Sebastian Silbermann <https://github.com/eps1lon>, Simon Schick <https://github.com/SimonSchick>, Thomas den Hollander <https://github.com/ThomasdenH>, Wilco Bakker <https://github.com/WilcoBakker>, wwwy3y3 <https://github.com/wwwy3y3>, Zane Hannan AU <https://github.com/ZaneHannanAU>.
node/index.d.ts CHANGED
@@ -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> {
@@ -174,7 +181,7 @@ interface SymbolConstructor {
174
181
  readonly iterator: symbol;
175
182
  readonly asyncIterator: symbol;
176
183
  }
177
- // declare const Symbol: SymbolConstructor;
184
+ declare var Symbol: SymbolConstructor;
178
185
  interface SharedArrayBuffer {
179
186
  readonly byteLength: number;
180
187
  slice(begin?: number, end?: number): SharedArrayBuffer;
@@ -194,26 +201,26 @@ interface String {
194
201
  * *
195
202
  ------------------------------------------------*/
196
203
  declare var process: NodeJS.Process;
197
- declare const global: NodeJS.Global;
204
+ declare var global: NodeJS.Global;
198
205
  declare var console: Console;
199
206
 
200
- declare const __filename: string;
201
- declare const __dirname: string;
207
+ declare var __filename: string;
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 {
@@ -256,7 +263,7 @@ interface NodeModule {
256
263
  declare var module: NodeModule;
257
264
 
258
265
  // Same as module.exports
259
- declare const exports: any;
266
+ declare var exports: any;
260
267
  declare const SlowBuffer: {
261
268
  new(str: string, encoding?: string): Buffer;
262
269
  new(size: number): Buffer;
@@ -811,8 +818,7 @@ declare namespace NodeJS {
811
818
  * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][]
812
819
  * environment variable.
813
820
  */
814
- // TODO: This Set is readonly
815
- allowedNodeEnvironmentFlags: Set<string>;
821
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
816
822
 
817
823
  /**
818
824
  * EventEmitter
@@ -953,9 +959,9 @@ declare namespace NodeJS {
953
959
  Uint8ClampedArray: Function;
954
960
  WeakMap: WeakMapConstructor;
955
961
  WeakSet: WeakSetConstructor;
956
- clearImmediate: (immediateId: any) => void;
957
- clearInterval: (intervalId: Timer) => void;
958
- clearTimeout: (timeoutId: Timer) => void;
962
+ clearImmediate: (immediateId: Immediate) => void;
963
+ clearInterval: (intervalId: Timeout) => void;
964
+ clearTimeout: (timeoutId: Timeout) => void;
959
965
  console: typeof console;
960
966
  decodeURI: typeof decodeURI;
961
967
  decodeURIComponent: typeof decodeURIComponent;
@@ -970,9 +976,9 @@ declare namespace NodeJS {
970
976
  parseInt: typeof parseInt;
971
977
  process: Process;
972
978
  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;
979
+ setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
980
+ setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
981
+ setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
976
982
  undefined: typeof undefined;
977
983
  unescape: (str: string) => string;
978
984
  gc: () => void;
@@ -981,6 +987,19 @@ declare namespace NodeJS {
981
987
 
982
988
  interface Timer {
983
989
  ref(): void;
990
+ refresh(): void;
991
+ unref(): void;
992
+ }
993
+
994
+ class Immediate {
995
+ ref(): void;
996
+ unref(): void;
997
+ _onImmediate: Function; // to distinguish it from the Timeout class
998
+ }
999
+
1000
+ class Timeout implements Timer {
1001
+ ref(): void;
1002
+ refresh(): void;
984
1003
  unref(): void;
985
1004
  }
986
1005
 
@@ -2651,6 +2670,7 @@ declare module "dns" {
2651
2670
  family?: number;
2652
2671
  hints?: number;
2653
2672
  all?: boolean;
2673
+ verbatim?: boolean;
2654
2674
  }
2655
2675
 
2656
2676
  interface LookupOneOptions extends LookupOptions {
@@ -7204,20 +7224,20 @@ declare module "v8" {
7204
7224
  }
7205
7225
 
7206
7226
  declare module "timers" {
7207
- function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
7227
+ function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
7208
7228
  namespace setTimeout {
7209
7229
  function __promisify__(ms: number): Promise<void>;
7210
7230
  function __promisify__<T>(ms: number, value: T): Promise<T>;
7211
7231
  }
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;
7232
+ function clearTimeout(timeoutId: NodeJS.Timeout): void;
7233
+ function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
7234
+ function clearInterval(intervalId: NodeJS.Timeout): void;
7235
+ function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
7216
7236
  namespace setImmediate {
7217
7237
  function __promisify__(): Promise<void>;
7218
7238
  function __promisify__<T>(value: T): Promise<T>;
7219
7239
  }
7220
- function clearImmediate(immediateId: any): void;
7240
+ function clearImmediate(immediateId: NodeJS.Immediate): void;
7221
7241
  }
7222
7242
 
7223
7243
  declare module "console" {
@@ -7879,7 +7899,8 @@ declare module "http2" {
7879
7899
  prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
7880
7900
  }
7881
7901
 
7882
- export interface Http2ServerRequest extends stream.Readable {
7902
+ export class Http2ServerRequest extends stream.Readable {
7903
+ private constructor();
7883
7904
  headers: IncomingHttpHeaders;
7884
7905
  httpVersion: string;
7885
7906
  method: string;
@@ -7910,7 +7931,8 @@ declare module "http2" {
7910
7931
  prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
7911
7932
  }
7912
7933
 
7913
- export interface Http2ServerResponse extends events.EventEmitter {
7934
+ export class Http2ServerResponse extends events.EventEmitter {
7935
+ private constructor();
7914
7936
  addTrailers(trailers: OutgoingHttpHeaders): void;
7915
7937
  connection: net.Socket | tls.TLSSocket;
7916
7938
  end(callback?: () => void): void;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "10.11.3",
3
+ "version": "10.11.7",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -162,6 +162,6 @@
162
162
  },
163
163
  "scripts": {},
164
164
  "dependencies": {},
165
- "typesPublisherContentHash": "db0c0d3f3fcfaefe044b1c6c63c0c40246b8890f1a21581df78af7e76f2f8377",
165
+ "typesPublisherContentHash": "f1d61fa3e0717679980bd54858e1d3a1bca0e466a5f0e4477e5bbb9183f0bb0f",
166
166
  "typeScriptVersion": "2.0"
167
167
  }