@types/node 10.5.3 → 10.5.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 (3) hide show
  1. node/README.md +2 -2
  2. node/index.d.ts +112 -98
  3. node/package.json +7 -2
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: Wed, 25 Jul 2018 01:26:51 GMT
11
+ * Last updated: Mon, 06 Aug 2018 21:55:25 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
 
15
15
  # Credits
16
- These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Klaus Meinhardt <https://github.com/ajafff>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Mohsen Azimi <https://github.com/mohsen1>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Alexander T. <https://github.com/a-tarasyuk>, Lishude <https://github.com/islishude>, Andrew Makarov <https://github.com/r3nya>, Zane Hannan AU <https://github.com/ZaneHannanAU>.
16
+ These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Klaus Meinhardt <https://github.com/ajafff>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Mohsen Azimi <https://github.com/mohsen1>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Alexander T. <https://github.com/a-tarasyuk>, Lishude <https://github.com/islishude>, Andrew Makarov <https://github.com/r3nya>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Eugene Y. Q. Shen <https://github.com/eyqs>.
node/index.d.ts CHANGED
@@ -26,6 +26,7 @@
26
26
  // Lishude <https://github.com/islishude>
27
27
  // Andrew Makarov <https://github.com/r3nya>
28
28
  // Zane Hannan AU <https://github.com/ZaneHannanAU>
29
+ // Eugene Y. Q. Shen <https://github.com/eyqs>
29
30
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
30
31
 
31
32
  /** inspector module types */
@@ -694,7 +695,7 @@ declare namespace NodeJS {
694
695
  columns?: number;
695
696
  rows?: number;
696
697
  _write(chunk: any, encoding: string, callback: Function): void;
697
- _destroy(err: Error, callback: Function): void;
698
+ _destroy(err: Error | null, callback: Function): void;
698
699
  _final(callback: Function): void;
699
700
  setDefaultEncoding(encoding: string): this;
700
701
  cork(): void;
@@ -707,7 +708,7 @@ declare namespace NodeJS {
707
708
  isRaw?: boolean;
708
709
  setRawMode?(mode: boolean): void;
709
710
  _read(size: number): void;
710
- _destroy(err: Error, callback: Function): void;
711
+ _destroy(err: Error | null, callback: Function): void;
711
712
  push(chunk: any, encoding?: string): boolean;
712
713
  destroy(error?: Error): void;
713
714
  }
@@ -1151,7 +1152,6 @@ declare module "http" {
1151
1152
  constructor();
1152
1153
 
1153
1154
  setTimeout(msecs: number, callback?: () => void): this;
1154
- destroy(error: Error): void;
1155
1155
  setHeader(name: string, value: number | string | string[]): void;
1156
1156
  getHeader(name: string): number | string | string[] | undefined;
1157
1157
  getHeaders(): OutgoingHttpHeaders;
@@ -2225,24 +2225,31 @@ declare module "child_process" {
2225
2225
  encoding: string | null; // specify `null`.
2226
2226
  }
2227
2227
 
2228
+ export interface ExecException extends Error {
2229
+ cmd?: string;
2230
+ killed?: boolean;
2231
+ code?: number;
2232
+ signal?: string;
2233
+ }
2234
+
2228
2235
  // no `options` definitely means stdout/stderr are `string`.
2229
- export function exec(command: string, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
2236
+ export function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
2230
2237
 
2231
2238
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
2232
- export function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
2239
+ export function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
2233
2240
 
2234
2241
  // `options` with well known `encoding` means stdout/stderr are definitely `string`.
2235
- export function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
2242
+ export function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
2236
2243
 
2237
2244
  // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
2238
2245
  // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
2239
- export function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
2246
+ export function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
2240
2247
 
2241
2248
  // `options` without an `encoding` means stdout/stderr are definitely `string`.
2242
- export function exec(command: string, options: ExecOptions, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
2249
+ export function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
2243
2250
 
2244
2251
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
2245
- export function exec(command: string, options: ({ encoding?: string | null } & ExecOptions) | undefined | null, callback?: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
2252
+ export function exec(command: string, options: ({ encoding?: string | null } & ExecOptions) | undefined | null, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
2246
2253
 
2247
2254
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
2248
2255
  export namespace exec {
@@ -2503,7 +2510,7 @@ declare module "url" {
2503
2510
  append(name: string, value: string): void;
2504
2511
  delete(name: string): void;
2505
2512
  entries(): IterableIterator<[string, string]>;
2506
- forEach(callback: (value: string, name: string) => void): void;
2513
+ forEach(callback: (value: string, name: string, searchParams: this) => void): void;
2507
2514
  get(name: string): string | null;
2508
2515
  getAll(name: string): string[];
2509
2516
  has(name: string): boolean;
@@ -2770,7 +2777,6 @@ declare module "net" {
2770
2777
 
2771
2778
  bufferSize: number;
2772
2779
  setEncoding(encoding?: string): this;
2773
- destroy(err?: any): void;
2774
2780
  pause(): this;
2775
2781
  resume(): this;
2776
2782
  setTimeout(timeout: number, callback?: Function): this;
@@ -3136,7 +3142,6 @@ declare module "fs" {
3136
3142
 
3137
3143
  export class ReadStream extends stream.Readable {
3138
3144
  close(): void;
3139
- destroy(): void;
3140
3145
  bytesRead: number;
3141
3146
  path: string | Buffer;
3142
3147
 
@@ -5858,8 +5863,8 @@ declare module "crypto" {
5858
5863
  export interface Signer extends NodeJS.WritableStream {
5859
5864
  update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer;
5860
5865
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
5861
- sign(private_key: string | { key: string; passphrase: string }): Buffer;
5862
- sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string;
5866
+ sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }): Buffer;
5867
+ sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string;
5863
5868
  }
5864
5869
  export function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
5865
5870
  export interface Verify extends NodeJS.WritableStream {
@@ -5971,8 +5976,8 @@ declare module "stream" {
5971
5976
  highWaterMark?: number;
5972
5977
  encoding?: string;
5973
5978
  objectMode?: boolean;
5974
- read?: (this: Readable, size?: number) => any;
5975
- destroy?: (error?: Error) => any;
5979
+ read?(this: Readable, size: number): void;
5980
+ destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void;
5976
5981
  }
5977
5982
 
5978
5983
  export class Readable extends Stream implements NodeJS.ReadableStream {
@@ -5990,7 +5995,7 @@ declare module "stream" {
5990
5995
  unshift(chunk: any): void;
5991
5996
  wrap(oldStream: NodeJS.ReadableStream): this;
5992
5997
  push(chunk: any, encoding?: string): boolean;
5993
- _destroy(err: Error, callback: Function): void;
5998
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
5994
5999
  destroy(error?: Error): void;
5995
6000
 
5996
6001
  /**
@@ -6002,66 +6007,66 @@ declare module "stream" {
6002
6007
  * 4. readable
6003
6008
  * 5. error
6004
6009
  */
6005
- addListener(event: string, listener: (...args: any[]) => void): this;
6006
6010
  addListener(event: "close", listener: () => void): this;
6007
- addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
6011
+ addListener(event: "data", listener: (chunk: any) => void): this;
6008
6012
  addListener(event: "end", listener: () => void): this;
6009
6013
  addListener(event: "readable", listener: () => void): this;
6010
6014
  addListener(event: "error", listener: (err: Error) => void): this;
6015
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
6011
6016
 
6012
- emit(event: string | symbol, ...args: any[]): boolean;
6013
6017
  emit(event: "close"): boolean;
6014
- emit(event: "data", chunk: Buffer | string): boolean;
6018
+ emit(event: "data", chunk: any): boolean;
6015
6019
  emit(event: "end"): boolean;
6016
6020
  emit(event: "readable"): boolean;
6017
6021
  emit(event: "error", err: Error): boolean;
6022
+ emit(event: string | symbol, ...args: any[]): boolean;
6018
6023
 
6019
- on(event: string, listener: (...args: any[]) => void): this;
6020
6024
  on(event: "close", listener: () => void): this;
6021
- on(event: "data", listener: (chunk: Buffer | string) => void): this;
6025
+ on(event: "data", listener: (chunk: any) => void): this;
6022
6026
  on(event: "end", listener: () => void): this;
6023
6027
  on(event: "readable", listener: () => void): this;
6024
6028
  on(event: "error", listener: (err: Error) => void): this;
6029
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
6025
6030
 
6026
- once(event: string, listener: (...args: any[]) => void): this;
6027
6031
  once(event: "close", listener: () => void): this;
6028
- once(event: "data", listener: (chunk: Buffer | string) => void): this;
6032
+ once(event: "data", listener: (chunk: any) => void): this;
6029
6033
  once(event: "end", listener: () => void): this;
6030
6034
  once(event: "readable", listener: () => void): this;
6031
6035
  once(event: "error", listener: (err: Error) => void): this;
6036
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
6032
6037
 
6033
- prependListener(event: string, listener: (...args: any[]) => void): this;
6034
6038
  prependListener(event: "close", listener: () => void): this;
6035
- prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
6039
+ prependListener(event: "data", listener: (chunk: any) => void): this;
6036
6040
  prependListener(event: "end", listener: () => void): this;
6037
6041
  prependListener(event: "readable", listener: () => void): this;
6038
6042
  prependListener(event: "error", listener: (err: Error) => void): this;
6043
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
6039
6044
 
6040
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6041
6045
  prependOnceListener(event: "close", listener: () => void): this;
6042
- prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
6046
+ prependOnceListener(event: "data", listener: (chunk: any) => void): this;
6043
6047
  prependOnceListener(event: "end", listener: () => void): this;
6044
6048
  prependOnceListener(event: "readable", listener: () => void): this;
6045
6049
  prependOnceListener(event: "error", listener: (err: Error) => void): this;
6050
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
6046
6051
 
6047
- removeListener(event: string, listener: (...args: any[]) => void): this;
6048
6052
  removeListener(event: "close", listener: () => void): this;
6049
- removeListener(event: "data", listener: (chunk: Buffer | string) => void): this;
6053
+ removeListener(event: "data", listener: (chunk: any) => void): this;
6050
6054
  removeListener(event: "end", listener: () => void): this;
6051
6055
  removeListener(event: "readable", listener: () => void): this;
6052
6056
  removeListener(event: "error", listener: (err: Error) => void): this;
6057
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
6053
6058
 
6054
- [Symbol.asyncIterator](): AsyncIterableIterator<Buffer | string>;
6059
+ [Symbol.asyncIterator](): AsyncIterableIterator<any>;
6055
6060
  }
6056
6061
 
6057
6062
  export interface WritableOptions {
6058
6063
  highWaterMark?: number;
6059
6064
  decodeStrings?: boolean;
6060
6065
  objectMode?: boolean;
6061
- write?: (chunk: any, encoding: string, callback: Function) => any;
6062
- writev?: (chunks: Array<{ chunk: any, encoding: string }>, callback: Function) => any;
6063
- destroy?: (error?: Error) => any;
6064
- final?: (callback: (error?: Error) => void) => void;
6066
+ write?(this: Writable, chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
6067
+ writev?(this: Writable, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
6068
+ destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
6069
+ final?(this: Writable, callback: (error?: Error | null) => void): void;
6065
6070
  }
6066
6071
 
6067
6072
  export class Writable extends Stream implements NodeJS.WritableStream {
@@ -6069,16 +6074,16 @@ declare module "stream" {
6069
6074
  readonly writableHighWaterMark: number;
6070
6075
  readonly writableLength: number;
6071
6076
  constructor(opts?: WritableOptions);
6072
- _write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
6073
- _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void;
6074
- _destroy(err: Error, callback: Function): void;
6075
- _final(callback: Function): void;
6076
- write(chunk: any, cb?: Function): boolean;
6077
- write(chunk: any, encoding?: string, cb?: Function): boolean;
6077
+ _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
6078
+ _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
6079
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
6080
+ _final(callback: (error?: Error | null) => void): void;
6081
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
6082
+ write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean;
6078
6083
  setDefaultEncoding(encoding: string): this;
6079
- end(cb?: Function): void;
6080
- end(chunk: any, cb?: Function): void;
6081
- end(chunk: any, encoding?: string, cb?: Function): void;
6084
+ end(cb?: () => void): void;
6085
+ end(chunk: any, cb?: () => void): void;
6086
+ end(chunk: any, encoding?: string, cb?: () => void): void;
6082
6087
  cork(): void;
6083
6088
  uncork(): void;
6084
6089
  destroy(error?: Error): void;
@@ -6093,67 +6098,72 @@ declare module "stream" {
6093
6098
  * 5. pipe
6094
6099
  * 6. unpipe
6095
6100
  */
6096
- addListener(event: string, listener: (...args: any[]) => void): this;
6097
6101
  addListener(event: "close", listener: () => void): this;
6098
6102
  addListener(event: "drain", listener: () => void): this;
6099
6103
  addListener(event: "error", listener: (err: Error) => void): this;
6100
6104
  addListener(event: "finish", listener: () => void): this;
6101
6105
  addListener(event: "pipe", listener: (src: Readable) => void): this;
6102
6106
  addListener(event: "unpipe", listener: (src: Readable) => void): this;
6107
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
6103
6108
 
6104
- emit(event: string | symbol, ...args: any[]): boolean;
6105
6109
  emit(event: "close"): boolean;
6106
- emit(event: "drain", chunk: Buffer | string): boolean;
6110
+ emit(event: "drain"): boolean;
6107
6111
  emit(event: "error", err: Error): boolean;
6108
6112
  emit(event: "finish"): boolean;
6109
6113
  emit(event: "pipe", src: Readable): boolean;
6110
6114
  emit(event: "unpipe", src: Readable): boolean;
6115
+ emit(event: string | symbol, ...args: any[]): boolean;
6111
6116
 
6112
- on(event: string, listener: (...args: any[]) => void): this;
6113
6117
  on(event: "close", listener: () => void): this;
6114
6118
  on(event: "drain", listener: () => void): this;
6115
6119
  on(event: "error", listener: (err: Error) => void): this;
6116
6120
  on(event: "finish", listener: () => void): this;
6117
6121
  on(event: "pipe", listener: (src: Readable) => void): this;
6118
6122
  on(event: "unpipe", listener: (src: Readable) => void): this;
6123
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
6119
6124
 
6120
- once(event: string, listener: (...args: any[]) => void): this;
6121
6125
  once(event: "close", listener: () => void): this;
6122
6126
  once(event: "drain", listener: () => void): this;
6123
6127
  once(event: "error", listener: (err: Error) => void): this;
6124
6128
  once(event: "finish", listener: () => void): this;
6125
6129
  once(event: "pipe", listener: (src: Readable) => void): this;
6126
6130
  once(event: "unpipe", listener: (src: Readable) => void): this;
6131
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
6127
6132
 
6128
- prependListener(event: string, listener: (...args: any[]) => void): this;
6129
6133
  prependListener(event: "close", listener: () => void): this;
6130
6134
  prependListener(event: "drain", listener: () => void): this;
6131
6135
  prependListener(event: "error", listener: (err: Error) => void): this;
6132
6136
  prependListener(event: "finish", listener: () => void): this;
6133
6137
  prependListener(event: "pipe", listener: (src: Readable) => void): this;
6134
6138
  prependListener(event: "unpipe", listener: (src: Readable) => void): this;
6139
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
6135
6140
 
6136
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6137
6141
  prependOnceListener(event: "close", listener: () => void): this;
6138
6142
  prependOnceListener(event: "drain", listener: () => void): this;
6139
6143
  prependOnceListener(event: "error", listener: (err: Error) => void): this;
6140
6144
  prependOnceListener(event: "finish", listener: () => void): this;
6141
6145
  prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
6142
6146
  prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
6147
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
6143
6148
 
6144
- removeListener(event: string, listener: (...args: any[]) => void): this;
6145
6149
  removeListener(event: "close", listener: () => void): this;
6146
6150
  removeListener(event: "drain", listener: () => void): this;
6147
6151
  removeListener(event: "error", listener: (err: Error) => void): this;
6148
6152
  removeListener(event: "finish", listener: () => void): this;
6149
6153
  removeListener(event: "pipe", listener: (src: Readable) => void): this;
6150
6154
  removeListener(event: "unpipe", listener: (src: Readable) => void): this;
6155
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
6151
6156
  }
6152
6157
 
6153
6158
  export interface DuplexOptions extends ReadableOptions, WritableOptions {
6154
6159
  allowHalfOpen?: boolean;
6155
6160
  readableObjectMode?: boolean;
6156
6161
  writableObjectMode?: boolean;
6162
+ read?(this: Duplex, size: number): void;
6163
+ write?(this: Duplex, chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
6164
+ writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
6165
+ final?(this: Duplex, callback: (error?: Error | null) => void): void;
6166
+ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
6157
6167
  }
6158
6168
 
6159
6169
  // Note: Duplex extends both Readable and Writable.
@@ -6162,31 +6172,36 @@ declare module "stream" {
6162
6172
  readonly writableHighWaterMark: number;
6163
6173
  readonly writableLength: number;
6164
6174
  constructor(opts?: DuplexOptions);
6165
- _write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
6166
- _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void;
6167
- _destroy(err: Error, callback: Function): void;
6168
- _final(callback: Function): void;
6169
- write(chunk: any, cb?: Function): boolean;
6170
- write(chunk: any, encoding?: string, cb?: Function): boolean;
6175
+ _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
6176
+ _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
6177
+ _destroy(error: Error | null, callback: (error: Error | null) => void): void;
6178
+ _final(callback: (error?: Error | null) => void): void;
6179
+ write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
6180
+ write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean;
6171
6181
  setDefaultEncoding(encoding: string): this;
6172
- end(cb?: Function): void;
6173
- end(chunk: any, cb?: Function): void;
6174
- end(chunk: any, encoding?: string, cb?: Function): void;
6182
+ end(cb?: () => void): void;
6183
+ end(chunk: any, cb?: () => void): void;
6184
+ end(chunk: any, encoding?: string, cb?: () => void): void;
6175
6185
  cork(): void;
6176
6186
  uncork(): void;
6177
6187
  }
6178
6188
 
6179
- type TransformCallback = (err?: Error, data?: any) => void;
6189
+ type TransformCallback = (error?: Error, data?: any) => void;
6180
6190
 
6181
6191
  export interface TransformOptions extends DuplexOptions {
6182
- transform?: (chunk: any, encoding: string, callback: TransformCallback) => any;
6183
- flush?: (callback: TransformCallback) => any;
6192
+ read?(this: Transform, size: number): void;
6193
+ write?(this: Transform, chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
6194
+ writev?(this: Transform, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void;
6195
+ final?(this: Transform, callback: (error?: Error | null) => void): void;
6196
+ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
6197
+ transform?(this: Transform, chunk: any, encoding: string, callback: TransformCallback): void;
6198
+ flush?(this: Transform, callback: TransformCallback): void;
6184
6199
  }
6185
6200
 
6186
6201
  export class Transform extends Duplex {
6187
6202
  constructor(opts?: TransformOptions);
6188
6203
  _transform(chunk: any, encoding: string, callback: TransformCallback): void;
6189
- destroy(error?: Error): void;
6204
+ _flush(callback: TransformCallback): void;
6190
6205
  }
6191
6206
 
6192
6207
  export class PassThrough extends Transform { }
@@ -6367,7 +6382,7 @@ declare module "util" {
6367
6382
  }
6368
6383
 
6369
6384
  declare module "assert" {
6370
- function internal(value: any, message?: string): void;
6385
+ function internal(value: any, message?: string | Error): void;
6371
6386
  namespace internal {
6372
6387
  export class AssertionError implements Error {
6373
6388
  name: string;
@@ -6376,46 +6391,42 @@ declare module "assert" {
6376
6391
  expected: any;
6377
6392
  operator: string;
6378
6393
  generatedMessage: boolean;
6394
+ code: 'ERR_ASSERTION';
6379
6395
 
6380
6396
  constructor(options?: {
6381
6397
  message?: string; actual?: any; expected?: any;
6382
- operator?: string; stackStartFunction?: Function
6398
+ operator?: string; stackStartFn?: Function
6383
6399
  });
6384
6400
  }
6385
6401
 
6386
- export function fail(message: string): never;
6387
- /** @deprecated since v10.0.0 */
6388
- export function fail(actual: any, expected: any, message?: string, operator?: string): never;
6389
- export function ok(value: any, message?: string): void;
6390
- /** @deprecated use strictEqual() */
6391
- export function equal(actual: any, expected: any, message?: string): void;
6392
- /** @deprecated use notStrictEqual() */
6393
- export function notEqual(actual: any, expected: any, message?: string): void;
6394
- /** @deprecated use deepStrictEqual() */
6395
- export function deepEqual(actual: any, expected: any, message?: string): void;
6396
- /** @deprecated use notDeepStrictEqual() */
6397
- export function notDeepEqual(acutal: any, expected: any, message?: string): void;
6398
- export function strictEqual(actual: any, expected: any, message?: string): void;
6399
- export function notStrictEqual(actual: any, expected: any, message?: string): void;
6400
- export function deepStrictEqual(actual: any, expected: any, message?: string): void;
6401
- export function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
6402
-
6403
- export function throws(block: Function, message?: string): void;
6404
- export function throws(block: Function, error: Function, message?: string): void;
6405
- export function throws(block: Function, error: RegExp, message?: string): void;
6406
- export function throws(block: Function, error: (err: any) => boolean, message?: string): void;
6407
-
6408
- export function doesNotThrow(block: Function, message?: string): void;
6409
- export function doesNotThrow(block: Function, error: Function, message?: string): void;
6410
- export function doesNotThrow(block: Function, error: RegExp, message?: string): void;
6411
- export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void;
6402
+ export function fail(message?: string | Error): never;
6403
+ /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
6404
+ export function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
6405
+ export function ok(value: any, message?: string | Error): void;
6406
+ /** @deprecated since v9.9.0 - use strictEqual() instead. */
6407
+ export function equal(actual: any, expected: any, message?: string | Error): void;
6408
+ /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
6409
+ export function notEqual(actual: any, expected: any, message?: string | Error): void;
6410
+ /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
6411
+ export function deepEqual(actual: any, expected: any, message?: string | Error): void;
6412
+ /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
6413
+ export function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
6414
+ export function strictEqual(actual: any, expected: any, message?: string | Error): void;
6415
+ export function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
6416
+ export function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
6417
+ export function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
6418
+
6419
+ export function throws(block: Function, message?: string | Error): void;
6420
+ export function throws(block: Function, error: RegExp | Function | Object | Error, message?: string | Error): void;
6421
+ export function doesNotThrow(block: Function, message?: string | Error): void;
6422
+ export function doesNotThrow(block: Function, error: RegExp | Function, message?: string | Error): void;
6412
6423
 
6413
6424
  export function ifError(value: any): void;
6414
6425
 
6415
- export function rejects(block: Function | Promise<any>, message?: string): Promise<void>;
6416
- export function rejects(block: Function | Promise<any>, error: Function | RegExp | Object | Error, message?: string): Promise<void>;
6417
- export function doesNotReject(block: Function | Promise<any>, message?: string): Promise<void>;
6418
- export function doesNotReject(block: Function | Promise<any>, error: Function | RegExp | Object | Error, message?: string): Promise<void>;
6426
+ export function rejects(block: Function | Promise<any>, message?: string | Error): Promise<void>;
6427
+ export function rejects(block: Function | Promise<any>, error: RegExp | Function | Object | Error, message?: string | Error): Promise<void>;
6428
+ export function doesNotReject(block: Function | Promise<any>, message?: string | Error): Promise<void>;
6429
+ export function doesNotReject(block: Function | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
6419
6430
 
6420
6431
  export var strict: typeof internal;
6421
6432
  }
@@ -7181,6 +7192,7 @@ declare module "http2" {
7181
7192
  readonly alpnProtocol?: string;
7182
7193
  close(callback?: () => void): void;
7183
7194
  readonly closed: boolean;
7195
+ readonly connecting: boolean;
7184
7196
  destroy(error?: Error, code?: number): void;
7185
7197
  readonly destroyed: boolean;
7186
7198
  readonly encrypted?: boolean;
@@ -7188,6 +7200,8 @@ declare module "http2" {
7188
7200
  readonly localSettings: Settings;
7189
7201
  readonly originSet?: string[];
7190
7202
  readonly pendingSettingsAck: boolean;
7203
+ ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
7204
+ ping(payload: Buffer | DataView | NodeJS.TypedArray , callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
7191
7205
  ref(): void;
7192
7206
  readonly remoteSettings: Settings;
7193
7207
  rstStream(stream: Http2Stream, code?: number): void;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "10.5.3",
3
+ "version": "10.5.7",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -131,6 +131,11 @@
131
131
  "name": "Zane Hannan AU",
132
132
  "url": "https://github.com/ZaneHannanAU",
133
133
  "githubUsername": "ZaneHannanAU"
134
+ },
135
+ {
136
+ "name": "Eugene Y. Q. Shen",
137
+ "url": "https://github.com/eyqs",
138
+ "githubUsername": "eyqs"
134
139
  }
135
140
  ],
136
141
  "main": "",
@@ -140,6 +145,6 @@
140
145
  },
141
146
  "scripts": {},
142
147
  "dependencies": {},
143
- "typesPublisherContentHash": "e271456ef7f32862b0b4a5c37f37fe026dae1b62c1178e010b672aee5589b5e3",
148
+ "typesPublisherContentHash": "ff6a9da38f7afe6c2a421ae121c99dabed96f1aca57674b6f7bf87b20f8dc62b",
144
149
  "typeScriptVersion": "2.0"
145
150
  }