@types/node 8.0.22 → 8.0.26

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 +3 -3
  2. node/index.d.ts +879 -54
  3. node/package.json +29 -14
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://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
9
9
 
10
10
  Additional Details
11
- * Last updated: Mon, 14 Aug 2017 20:37:50 GMT
12
- * Dependencies: events, net, stream, url, child_process, tls, http, readline, crypto
11
+ * Last updated: Tue, 29 Aug 2017 21:31:37 GMT
12
+ * Dependencies: events, net, stream, url, child_process, tls, http, readline, crypto, fs
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>, Roberto Desideri <https://github.com/RobDesideri>, 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>, Daniel Imms <https://github.com/Tyriar>, Deividas Bakanas <https://github.com/DeividasBakanas>.
16
+ These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Roberto Desideri <https://github.com/RobDesideri>, 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>, Daniel Imms <https://github.com/Tyriar>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>.
node/index.d.ts CHANGED
@@ -13,6 +13,7 @@
13
13
  // wwwy3y3 <https://github.com/wwwy3y3>
14
14
  // Daniel Imms <https://github.com/Tyriar>
15
15
  // Deividas Bakanas <https://github.com/DeividasBakanas>
16
+ // Kelvin Jin <https://github.com/kjin>
16
17
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
17
18
  // TypeScript Version: 2.2
18
19
 
@@ -1011,7 +1012,7 @@ declare module "cluster" {
1011
1012
  id: string;
1012
1013
  process: child.ChildProcess;
1013
1014
  suicide: boolean;
1014
- send(message: any, sendHandle?: any): boolean;
1015
+ send(message: any, sendHandle?: any, callback?: (error: Error) => void): boolean;
1015
1016
  kill(signal?: string): void;
1016
1017
  destroy(signal?: string): void;
1017
1018
  disconnect(): void;
@@ -1030,7 +1031,7 @@ declare module "cluster" {
1030
1031
  */
1031
1032
  addListener(event: string, listener: (...args: any[]) => void): this;
1032
1033
  addListener(event: "disconnect", listener: () => void): this;
1033
- addListener(event: "error", listener: (code: number, signal: string) => void): this;
1034
+ addListener(event: "error", listener: (error: Error) => void): this;
1034
1035
  addListener(event: "exit", listener: (code: number, signal: string) => void): this;
1035
1036
  addListener(event: "listening", listener: (address: Address) => void): this;
1036
1037
  addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
@@ -1038,7 +1039,7 @@ declare module "cluster" {
1038
1039
 
1039
1040
  emit(event: string | symbol, ...args: any[]): boolean;
1040
1041
  emit(event: "disconnect"): boolean;
1041
- emit(event: "error", code: number, signal: string): boolean;
1042
+ emit(event: "error", error: Error): boolean;
1042
1043
  emit(event: "exit", code: number, signal: string): boolean;
1043
1044
  emit(event: "listening", address: Address): boolean;
1044
1045
  emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
@@ -1046,7 +1047,7 @@ declare module "cluster" {
1046
1047
 
1047
1048
  on(event: string, listener: (...args: any[]) => void): this;
1048
1049
  on(event: "disconnect", listener: () => void): this;
1049
- on(event: "error", listener: (code: number, signal: string) => void): this;
1050
+ on(event: "error", listener: (error: Error) => void): this;
1050
1051
  on(event: "exit", listener: (code: number, signal: string) => void): this;
1051
1052
  on(event: "listening", listener: (address: Address) => void): this;
1052
1053
  on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
@@ -1054,7 +1055,7 @@ declare module "cluster" {
1054
1055
 
1055
1056
  once(event: string, listener: (...args: any[]) => void): this;
1056
1057
  once(event: "disconnect", listener: () => void): this;
1057
- once(event: "error", listener: (code: number, signal: string) => void): this;
1058
+ once(event: "error", listener: (error: Error) => void): this;
1058
1059
  once(event: "exit", listener: (code: number, signal: string) => void): this;
1059
1060
  once(event: "listening", listener: (address: Address) => void): this;
1060
1061
  once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
@@ -1062,7 +1063,7 @@ declare module "cluster" {
1062
1063
 
1063
1064
  prependListener(event: string, listener: (...args: any[]) => void): this;
1064
1065
  prependListener(event: "disconnect", listener: () => void): this;
1065
- prependListener(event: "error", listener: (code: number, signal: string) => void): this;
1066
+ prependListener(event: "error", listener: (error: Error) => void): this;
1066
1067
  prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
1067
1068
  prependListener(event: "listening", listener: (address: Address) => void): this;
1068
1069
  prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
@@ -1070,7 +1071,7 @@ declare module "cluster" {
1070
1071
 
1071
1072
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
1072
1073
  prependOnceListener(event: "disconnect", listener: () => void): this;
1073
- prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this;
1074
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
1074
1075
  prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
1075
1076
  prependOnceListener(event: "listening", listener: (address: Address) => void): this;
1076
1077
  prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
@@ -1272,27 +1273,27 @@ declare module "zlib" {
1272
1273
  export function createInflateRaw(options?: ZlibOptions): InflateRaw;
1273
1274
  export function createUnzip(options?: ZlibOptions): Unzip;
1274
1275
 
1275
- export function deflate(buf: Buffer | string, callback: (error: Error, result: Buffer) => void): void;
1276
- export function deflate(buf: Buffer | string, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void;
1276
+ export function deflate(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
1277
+ export function deflate(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
1277
1278
  export function deflateSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
1278
- export function deflateRaw(buf: Buffer | string, callback: (error: Error, result: Buffer) => void): void;
1279
- export function deflateRaw(buf: Buffer | string, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void;
1279
+ export function deflateRaw(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
1280
+ export function deflateRaw(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
1280
1281
  export function deflateRawSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
1281
- export function gzip(buf: Buffer, callback: (error: Error, result: Buffer) => void): void;
1282
- export function gzip(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void;
1283
- export function gzipSync(buf: Buffer, options?: ZlibOptions): Buffer;
1284
- export function gunzip(buf: Buffer, callback: (error: Error, result: Buffer) => void): void;
1285
- export function gunzip(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void;
1286
- export function gunzipSync(buf: Buffer, options?: ZlibOptions): Buffer;
1287
- export function inflate(buf: Buffer, callback: (error: Error, result: Buffer) => void): void;
1288
- export function inflate(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void;
1289
- export function inflateSync(buf: Buffer, options?: ZlibOptions): Buffer;
1290
- export function inflateRaw(buf: Buffer, callback: (error: Error, result: Buffer) => void): void;
1291
- export function inflateRaw(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void;
1292
- export function inflateRawSync(buf: Buffer, options?: ZlibOptions): Buffer;
1293
- export function unzip(buf: Buffer, callback: (error: Error, result: Buffer) => void): void;
1294
- export function unzip(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void;
1295
- export function unzipSync(buf: Buffer, options?: ZlibOptions): Buffer;
1282
+ export function gzip(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
1283
+ export function gzip(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
1284
+ export function gzipSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
1285
+ export function gunzip(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
1286
+ export function gunzip(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
1287
+ export function gunzipSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
1288
+ export function inflate(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
1289
+ export function inflate(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
1290
+ export function inflateSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
1291
+ export function inflateRaw(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
1292
+ export function inflateRaw(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
1293
+ export function inflateRawSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
1294
+ export function unzip(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
1295
+ export function unzip(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
1296
+ export function unzipSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
1296
1297
 
1297
1298
  export namespace constants {
1298
1299
  // Allowed flush values.
@@ -1379,14 +1380,24 @@ declare module "os" {
1379
1380
  };
1380
1381
  }
1381
1382
 
1382
- export interface NetworkInterfaceInfo {
1383
+ export interface NetworkInterfaceBase {
1383
1384
  address: string;
1384
1385
  netmask: string;
1385
- family: string;
1386
1386
  mac: string;
1387
1387
  internal: boolean;
1388
1388
  }
1389
1389
 
1390
+ export interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
1391
+ family: "IPv4";
1392
+ }
1393
+
1394
+ export interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
1395
+ family: "IPv6";
1396
+ scopeid: number;
1397
+ }
1398
+
1399
+ export type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
1400
+
1390
1401
  export function hostname(): string;
1391
1402
  export function loadavg(): number[];
1392
1403
  export function uptime(): number;
@@ -1809,6 +1820,7 @@ declare module "child_process" {
1809
1820
  stdout: stream.Readable;
1810
1821
  stderr: stream.Readable;
1811
1822
  stdio: [stream.Writable, stream.Readable, stream.Readable];
1823
+ killed: boolean;
1812
1824
  pid: number;
1813
1825
  kill(signal?: string): void;
1814
1826
  send(message: any, callback?: (error: Error) => void): boolean;
@@ -1907,23 +1919,23 @@ declare module "child_process" {
1907
1919
  }
1908
1920
 
1909
1921
  // no `options` definitely means stdout/stderr are `string`.
1910
- export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1922
+ export function exec(command: string, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1911
1923
 
1912
1924
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
1913
- export function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
1925
+ export function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
1914
1926
 
1915
1927
  // `options` with well known `encoding` means stdout/stderr are definitely `string`.
1916
- export function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1928
+ export function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1917
1929
 
1918
1930
  // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
1919
1931
  // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
1920
- export function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: Error, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1932
+ export function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1921
1933
 
1922
1934
  // `options` without an `encoding` means stdout/stderr are definitely `string`.
1923
- export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1935
+ export function exec(command: string, options: ExecOptions, callback?: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1924
1936
 
1925
1937
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
1926
- export function exec(command: string, options: ({ encoding?: string | null } & ExecOptions) | undefined | null, callback?: (error: Error, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1938
+ export function exec(command: string, options: ({ encoding?: string | null } & ExecOptions) | undefined | null, callback?: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1927
1939
 
1928
1940
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1929
1941
  export namespace exec {
@@ -1956,28 +1968,28 @@ declare module "child_process" {
1956
1968
  export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
1957
1969
 
1958
1970
  // no `options` definitely means stdout/stderr are `string`.
1959
- export function execFile(file: string, callback: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1971
+ export function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1960
1972
 
1961
1973
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
1962
- export function execFile(file: string, options: { encoding: "buffer" | null } & ExecFileOptions, callback: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1963
- export function execFile(file: string, args: string[] | undefined | null, options: { encoding: "buffer" | null } & ExecFileOptions, callback: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1974
+ export function execFile(file: string, options: { encoding: "buffer" | null } & ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1975
+ export function execFile(file: string, args: string[] | undefined | null, options: { encoding: "buffer" | null } & ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1964
1976
 
1965
1977
  // `options` with well known `encoding` means stdout/stderr are definitely `string`.
1966
- export function execFile(file: string, options: { encoding: BufferEncoding } & ExecFileOptions, callback: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
1967
- export function execFile(file: string, args: string[] | undefined | null, options: { encoding: BufferEncoding } & ExecFileOptions, callback: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
1978
+ export function execFile(file: string, options: { encoding: BufferEncoding } & ExecFileOptions, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
1979
+ export function execFile(file: string, args: string[] | undefined | null, options: { encoding: BufferEncoding } & ExecFileOptions, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
1968
1980
 
1969
1981
  // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
1970
1982
  // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
1971
- export function execFile(file: string, options: { encoding: string } & ExecFileOptions, callback: (error: Error, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1972
- export function execFile(file: string, args: string[] | undefined | null, options: { encoding: string } & ExecFileOptions, callback: (error: Error, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1983
+ export function execFile(file: string, options: { encoding: string } & ExecFileOptions, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1984
+ export function execFile(file: string, args: string[] | undefined | null, options: { encoding: string } & ExecFileOptions, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
1973
1985
 
1974
1986
  // `options` without an `encoding` means stdout/stderr are definitely `string`.
1975
- export function execFile(file: string, options: ExecFileOptions, callback: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1976
- export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptions, callback: (error: Error, stdout: string, stderr: string) => void): ChildProcess;
1987
+ export function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1988
+ export function execFile(file: string, args: string[] | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
1977
1989
 
1978
1990
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
1979
- export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
1980
- export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
1991
+ export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
1992
+ export function execFile(file: string, args: string[] | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
1981
1993
 
1982
1994
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1983
1995
  export namespace execFile {
@@ -2480,7 +2492,7 @@ declare module "net" {
2480
2492
  listen(handle: any, listeningListener?: Function): Server;
2481
2493
  close(callback?: Function): Server;
2482
2494
  address(): { port: number; family: string; address: string; };
2483
- getConnections(cb: (error: Error, count: number) => void): void;
2495
+ getConnections(cb: (error: Error | null, count: number) => void): void;
2484
2496
  ref(): Server;
2485
2497
  unref(): Server;
2486
2498
  maxConnections: number;
@@ -2575,8 +2587,8 @@ declare module "dgram" {
2575
2587
  export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
2576
2588
 
2577
2589
  export interface Socket extends events.EventEmitter {
2578
- send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void;
2579
- send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void;
2590
+ send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void;
2591
+ send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void;
2580
2592
  bind(port?: number, address?: string, callback?: () => void): void;
2581
2593
  bind(port?: number, callback?: () => void): void;
2582
2594
  bind(callback?: () => void): void;
@@ -2685,23 +2697,23 @@ declare module "fs" {
2685
2697
  */
2686
2698
  addListener(event: string, listener: (...args: any[]) => void): this;
2687
2699
  addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
2688
- addListener(event: "error", listener: (code: number, signal: string) => void): this;
2700
+ addListener(event: "error", listener: (error: Error) => void): this;
2689
2701
 
2690
2702
  on(event: string, listener: (...args: any[]) => void): this;
2691
2703
  on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
2692
- on(event: "error", listener: (code: number, signal: string) => void): this;
2704
+ on(event: "error", listener: (error: Error) => void): this;
2693
2705
 
2694
2706
  once(event: string, listener: (...args: any[]) => void): this;
2695
2707
  once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
2696
- once(event: "error", listener: (code: number, signal: string) => void): this;
2708
+ once(event: "error", listener: (error: Error) => void): this;
2697
2709
 
2698
2710
  prependListener(event: string, listener: (...args: any[]) => void): this;
2699
2711
  prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
2700
- prependListener(event: "error", listener: (code: number, signal: string) => void): this;
2712
+ prependListener(event: "error", listener: (error: Error) => void): this;
2701
2713
 
2702
2714
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
2703
2715
  prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
2704
- prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this;
2716
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
2705
2717
  }
2706
2718
 
2707
2719
  export interface ReadStream extends stream.Readable {
@@ -4967,7 +4979,6 @@ declare module "stream" {
4967
4979
  pause(): this;
4968
4980
  resume(): this;
4969
4981
  isPaused(): boolean;
4970
- pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
4971
4982
  unpipe<T extends NodeJS.WritableStream>(destination?: T): this;
4972
4983
  unshift(chunk: any): void;
4973
4984
  wrap(oldStream: NodeJS.ReadableStream): Readable;
@@ -5821,3 +5832,817 @@ declare module "async_hooks" {
5821
5832
  */
5822
5833
  export function createHook(options: HookCallbacks): AsyncHook;
5823
5834
  }
5835
+
5836
+ declare module "http2" {
5837
+ import * as events from "events";
5838
+ import * as fs from "fs";
5839
+ import * as net from "net";
5840
+ import * as stream from "stream";
5841
+ import * as tls from "tls";
5842
+ import * as url from "url";
5843
+
5844
+ import { IncomingHttpHeaders, OutgoingHttpHeaders } from "http";
5845
+ export { IncomingHttpHeaders, OutgoingHttpHeaders } from "http";
5846
+
5847
+ // Http2Stream
5848
+
5849
+ export interface StreamPriorityOptions {
5850
+ exclusive?: boolean;
5851
+ parent?: number;
5852
+ weight?: number;
5853
+ silent?: boolean;
5854
+ }
5855
+
5856
+ export interface StreamState {
5857
+ localWindowSize?: number;
5858
+ state?: number;
5859
+ streamLocalClose?: number;
5860
+ streamRemoteClose?: number;
5861
+ sumDependencyWeight?: number;
5862
+ weight?: number;
5863
+ }
5864
+
5865
+ export interface ServerStreamResponseOptions {
5866
+ endStream?: boolean;
5867
+ getTrailers?: (trailers: IncomingHttpHeaders) => void;
5868
+ }
5869
+
5870
+ export interface StatOptions {
5871
+ offset: number;
5872
+ length: number;
5873
+ }
5874
+
5875
+ export interface ServerStreamFileResponseOptions {
5876
+ statCheck?: (stats: fs.Stats, headers: IncomingHttpHeaders, statOptions: StatOptions) => void;
5877
+ getTrailers?: (trailers: IncomingHttpHeaders) => void;
5878
+ offset?: number;
5879
+ length?: number;
5880
+ }
5881
+
5882
+ export interface Http2Stream extends stream.Duplex {
5883
+ readonly aborted: boolean;
5884
+ readonly destroyed: boolean;
5885
+ priority(options: StreamPriorityOptions): void;
5886
+ readonly rstCode: number;
5887
+ rstStream(code: number): void;
5888
+ rstWithNoError(): void;
5889
+ rstWithProtocolError(): void;
5890
+ rstWithCancel(): void;
5891
+ rstWithRefuse(): void;
5892
+ rstWithInternalError(): void;
5893
+ readonly session: Http2Session;
5894
+ setTimeout(msecs: number, callback?: () => void): void;
5895
+ readonly state: StreamState;
5896
+
5897
+ addListener(event: string, listener: (...args: any[]) => void): this;
5898
+ addListener(event: "aborted", listener: () => void): this;
5899
+ addListener(event: "close", listener: () => void): this;
5900
+ addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
5901
+ addListener(event: "drain", listener: () => void): this;
5902
+ addListener(event: "end", listener: () => void): this;
5903
+ addListener(event: "error", listener: (err: Error) => void): this;
5904
+ addListener(event: "finish", listener: () => void): this;
5905
+ addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
5906
+ addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
5907
+ addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
5908
+ addListener(event: "streamClosed", listener: (code: number) => void): this;
5909
+ addListener(event: "timeout", listener: () => void): this;
5910
+ addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
5911
+
5912
+ emit(event: string | symbol, ...args: any[]): boolean;
5913
+ emit(event: "aborted"): boolean;
5914
+ emit(event: "close"): boolean;
5915
+ emit(event: "data", chunk: Buffer | string): boolean;
5916
+ emit(event: "drain"): boolean;
5917
+ emit(event: "end"): boolean;
5918
+ emit(event: "error", err: Error): boolean;
5919
+ emit(event: "finish"): boolean;
5920
+ emit(event: "frameError", frameType: number, errorCode: number): boolean;
5921
+ emit(event: "pipe", src: stream.Readable): boolean;
5922
+ emit(event: "unpipe", src: stream.Readable): boolean;
5923
+ emit(event: "streamClosed", code: number): boolean;
5924
+ emit(event: "timeout"): boolean;
5925
+ emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean;
5926
+
5927
+ on(event: string, listener: (...args: any[]) => void): this;
5928
+ on(event: "aborted", listener: () => void): this;
5929
+ on(event: "close", listener: () => void): this;
5930
+ on(event: "data", listener: (chunk: Buffer | string) => void): this;
5931
+ on(event: "drain", listener: () => void): this;
5932
+ on(event: "end", listener: () => void): this;
5933
+ on(event: "error", listener: (err: Error) => void): this;
5934
+ on(event: "finish", listener: () => void): this;
5935
+ on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
5936
+ on(event: "pipe", listener: (src: stream.Readable) => void): this;
5937
+ on(event: "unpipe", listener: (src: stream.Readable) => void): this;
5938
+ on(event: "streamClosed", listener: (code: number) => void): this;
5939
+ on(event: "timeout", listener: () => void): this;
5940
+ on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
5941
+
5942
+ once(event: string, listener: (...args: any[]) => void): this;
5943
+ once(event: "aborted", listener: () => void): this;
5944
+ once(event: "close", listener: () => void): this;
5945
+ once(event: "data", listener: (chunk: Buffer | string) => void): this;
5946
+ once(event: "drain", listener: () => void): this;
5947
+ once(event: "end", listener: () => void): this;
5948
+ once(event: "error", listener: (err: Error) => void): this;
5949
+ once(event: "finish", listener: () => void): this;
5950
+ once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
5951
+ once(event: "pipe", listener: (src: stream.Readable) => void): this;
5952
+ once(event: "unpipe", listener: (src: stream.Readable) => void): this;
5953
+ once(event: "streamClosed", listener: (code: number) => void): this;
5954
+ once(event: "timeout", listener: () => void): this;
5955
+ once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
5956
+
5957
+ prependListener(event: string, listener: (...args: any[]) => void): this;
5958
+ prependListener(event: "aborted", listener: () => void): this;
5959
+ prependListener(event: "close", listener: () => void): this;
5960
+ prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
5961
+ prependListener(event: "drain", listener: () => void): this;
5962
+ prependListener(event: "end", listener: () => void): this;
5963
+ prependListener(event: "error", listener: (err: Error) => void): this;
5964
+ prependListener(event: "finish", listener: () => void): this;
5965
+ prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
5966
+ prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
5967
+ prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
5968
+ prependListener(event: "streamClosed", listener: (code: number) => void): this;
5969
+ prependListener(event: "timeout", listener: () => void): this;
5970
+ prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
5971
+
5972
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
5973
+ prependOnceListener(event: "aborted", listener: () => void): this;
5974
+ prependOnceListener(event: "close", listener: () => void): this;
5975
+ prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
5976
+ prependOnceListener(event: "drain", listener: () => void): this;
5977
+ prependOnceListener(event: "end", listener: () => void): this;
5978
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
5979
+ prependOnceListener(event: "finish", listener: () => void): this;
5980
+ prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
5981
+ prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
5982
+ prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
5983
+ prependOnceListener(event: "streamClosed", listener: (code: number) => void): this;
5984
+ prependOnceListener(event: "timeout", listener: () => void): this;
5985
+ prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
5986
+ }
5987
+
5988
+ export interface ClientHttp2Stream extends Http2Stream {
5989
+ addListener(event: string, listener: (...args: any[]) => void): this;
5990
+ addListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
5991
+ addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
5992
+ addListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
5993
+
5994
+ emit(event: string | symbol, ...args: any[]): boolean;
5995
+ emit(event: "headers", headers: IncomingHttpHeaders, flags: number): boolean;
5996
+ emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean;
5997
+ emit(event: "response", headers: IncomingHttpHeaders, flags: number): boolean;
5998
+
5999
+ on(event: string, listener: (...args: any[]) => void): this;
6000
+ on(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6001
+ on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6002
+ on(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6003
+
6004
+ once(event: string, listener: (...args: any[]) => void): this;
6005
+ once(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6006
+ once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6007
+ once(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6008
+
6009
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6010
+ prependListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6011
+ prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6012
+ prependListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6013
+
6014
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6015
+ prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6016
+ prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6017
+ prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
6018
+ }
6019
+
6020
+ export interface ServerHttp2Stream extends Http2Stream {
6021
+ additionalHeaders(headers: OutgoingHttpHeaders): void;
6022
+ readonly headersSent: boolean;
6023
+ readonly pushAllowed: boolean;
6024
+ pushStream(headers: OutgoingHttpHeaders, callback?: (pushStream: ServerHttp2Stream) => void): void;
6025
+ pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (pushStream: ServerHttp2Stream) => void): void;
6026
+ respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
6027
+ respondWithFD(fd: number, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
6028
+ respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
6029
+ }
6030
+
6031
+ // Http2Session
6032
+
6033
+ export interface Settings {
6034
+ headerTableSize?: number;
6035
+ enablePush?: boolean;
6036
+ initialWindowSize?: number;
6037
+ maxFrameSize?: number;
6038
+ maxConcurrentStreams?: number;
6039
+ maxHeaderListSize?: number;
6040
+ }
6041
+
6042
+ export interface ClientSessionRequestOptions {
6043
+ endStream?: boolean;
6044
+ exclusive?: boolean;
6045
+ parent?: number;
6046
+ weight?: number;
6047
+ getTrailers?: (trailers: IncomingHttpHeaders, flags: number) => void;
6048
+ }
6049
+
6050
+ export interface SessionShutdownOptions {
6051
+ graceful?: boolean;
6052
+ errorCode?: number;
6053
+ lastStreamID?: number;
6054
+ opaqueData?: Buffer | Uint8Array;
6055
+ }
6056
+
6057
+ export interface SessionState {
6058
+ effectiveLocalWindowSize?: number;
6059
+ effectiveRecvDataLength?: number;
6060
+ nextStreamID?: number;
6061
+ localWindowSize?: number;
6062
+ lastProcStreamID?: number;
6063
+ remoteWindowSize?: number;
6064
+ outboundQueueSize?: number;
6065
+ deflateDynamicTableSize?: number;
6066
+ inflateDynamicTableSize?: number;
6067
+ }
6068
+
6069
+ export interface Http2Session extends events.EventEmitter {
6070
+ destroy(): void;
6071
+ readonly destroyed: boolean;
6072
+ readonly localSettings: Settings;
6073
+ readonly pendingSettingsAck: boolean;
6074
+ readonly remoteSettings: Settings;
6075
+ rstStream(stream: Http2Stream, code?: number): void;
6076
+ setTimeout(msecs: number, callback?: () => void): void;
6077
+ shutdown(callback?: () => void): void;
6078
+ shutdown(options: SessionShutdownOptions, callback?: () => void): void;
6079
+ readonly socket: net.Socket | tls.TLSSocket;
6080
+ readonly state: SessionState;
6081
+ priority(stream: Http2Stream, options: StreamPriorityOptions): void;
6082
+ settings(settings: Settings): void;
6083
+ readonly type: number;
6084
+
6085
+ addListener(event: string, listener: (...args: any[]) => void): this;
6086
+ addListener(event: "close", listener: () => void): this;
6087
+ addListener(event: "error", listener: (err: Error) => void): this;
6088
+ addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
6089
+ addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
6090
+ addListener(event: "localSettings", listener: (settings: Settings) => void): this;
6091
+ addListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
6092
+ addListener(event: "socketError", listener: (err: Error) => void): this;
6093
+ addListener(event: "timeout", listener: () => void): this;
6094
+
6095
+ emit(event: string | symbol, ...args: any[]): boolean;
6096
+ emit(event: "close"): boolean;
6097
+ emit(event: "error", err: Error): boolean;
6098
+ emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean;
6099
+ emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
6100
+ emit(event: "localSettings", settings: Settings): boolean;
6101
+ emit(event: "remoteSettings", settings: Settings): boolean;
6102
+ emit(event: "socketError", err: Error): boolean;
6103
+ emit(event: "timeout"): boolean;
6104
+
6105
+ on(event: string, listener: (...args: any[]) => void): this;
6106
+ on(event: "close", listener: () => void): this;
6107
+ on(event: "error", listener: (err: Error) => void): this;
6108
+ on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
6109
+ on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
6110
+ on(event: "localSettings", listener: (settings: Settings) => void): this;
6111
+ on(event: "remoteSettings", listener: (settings: Settings) => void): this;
6112
+ on(event: "socketError", listener: (err: Error) => void): this;
6113
+ on(event: "timeout", listener: () => void): this;
6114
+
6115
+ once(event: string, listener: (...args: any[]) => void): this;
6116
+ once(event: "close", listener: () => void): this;
6117
+ once(event: "error", listener: (err: Error) => void): this;
6118
+ once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
6119
+ once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
6120
+ once(event: "localSettings", listener: (settings: Settings) => void): this;
6121
+ once(event: "remoteSettings", listener: (settings: Settings) => void): this;
6122
+ once(event: "socketError", listener: (err: Error) => void): this;
6123
+ once(event: "timeout", listener: () => void): this;
6124
+
6125
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6126
+ prependListener(event: "close", listener: () => void): this;
6127
+ prependListener(event: "error", listener: (err: Error) => void): this;
6128
+ prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
6129
+ prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
6130
+ prependListener(event: "localSettings", listener: (settings: Settings) => void): this;
6131
+ prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
6132
+ prependListener(event: "socketError", listener: (err: Error) => void): this;
6133
+ prependListener(event: "timeout", listener: () => void): this;
6134
+
6135
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6136
+ prependOnceListener(event: "close", listener: () => void): this;
6137
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
6138
+ prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
6139
+ prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
6140
+ prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;
6141
+ prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
6142
+ prependOnceListener(event: "socketError", listener: (err: Error) => void): this;
6143
+ prependOnceListener(event: "timeout", listener: () => void): this;
6144
+ }
6145
+
6146
+ export interface ClientHttp2Session extends Http2Session {
6147
+ request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
6148
+
6149
+ addListener(event: string, listener: (...args: any[]) => void): this;
6150
+ addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6151
+ addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6152
+
6153
+ emit(event: string | symbol, ...args: any[]): boolean;
6154
+ emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
6155
+ emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
6156
+
6157
+ on(event: string, listener: (...args: any[]) => void): this;
6158
+ on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6159
+ on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6160
+
6161
+ once(event: string, listener: (...args: any[]) => void): this;
6162
+ once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6163
+ once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6164
+
6165
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6166
+ prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6167
+ prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6168
+
6169
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6170
+ prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6171
+ prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6172
+ }
6173
+
6174
+ export interface ServerHttp2Session extends Http2Session {
6175
+ readonly server: Http2Server | Http2SecureServer;
6176
+
6177
+ addListener(event: string, listener: (...args: any[]) => void): this;
6178
+ addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6179
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6180
+
6181
+ emit(event: string | symbol, ...args: any[]): boolean;
6182
+ emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
6183
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
6184
+
6185
+ on(event: string, listener: (...args: any[]) => void): this;
6186
+ on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6187
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6188
+
6189
+ once(event: string, listener: (...args: any[]) => void): this;
6190
+ once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6191
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6192
+
6193
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6194
+ prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6195
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6196
+
6197
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6198
+ prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
6199
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6200
+ }
6201
+
6202
+ // Http2Server
6203
+
6204
+ export interface SessionOptions {
6205
+ maxDeflateDynamicTableSize?: number;
6206
+ maxReservedRemoteStreams?: number;
6207
+ maxSendHeaderBlockLength?: number;
6208
+ paddingStrategy?: number;
6209
+ peerMaxConcurrentStreams?: number;
6210
+ selectPadding?: (frameLen: number, maxFrameLen: number) => number;
6211
+ settings?: Settings;
6212
+ }
6213
+
6214
+ export type ClientSessionOptions = SessionOptions;
6215
+ export type ServerSessionOptions = SessionOptions;
6216
+
6217
+ export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
6218
+ export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {}
6219
+
6220
+ export interface ServerOptions extends ServerSessionOptions {
6221
+ allowHTTP1?: boolean;
6222
+ }
6223
+
6224
+ export interface SecureServerOptions extends SecureServerSessionOptions {
6225
+ allowHTTP1?: boolean;
6226
+ }
6227
+
6228
+ export interface Http2Server extends net.Server {
6229
+ addListener(event: string, listener: (...args: any[]) => void): this;
6230
+ addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6231
+ addListener(event: "sessionError", listener: (err: Error) => void): this;
6232
+ addListener(event: "socketError", listener: (err: Error) => void): this;
6233
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6234
+ addListener(event: "timeout", listener: () => void): this;
6235
+
6236
+ emit(event: string | symbol, ...args: any[]): boolean;
6237
+ emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
6238
+ emit(event: "sessionError", err: Error): boolean;
6239
+ emit(event: "socketError", err: Error): boolean;
6240
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
6241
+ emit(event: "timeout"): boolean;
6242
+
6243
+ on(event: string, listener: (...args: any[]) => void): this;
6244
+ on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6245
+ on(event: "sessionError", listener: (err: Error) => void): this;
6246
+ on(event: "socketError", listener: (err: Error) => void): this;
6247
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6248
+ on(event: "timeout", listener: () => void): this;
6249
+
6250
+ once(event: string, listener: (...args: any[]) => void): this;
6251
+ once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6252
+ once(event: "sessionError", listener: (err: Error) => void): this;
6253
+ once(event: "socketError", listener: (err: Error) => void): this;
6254
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6255
+ once(event: "timeout", listener: () => void): this;
6256
+
6257
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6258
+ prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6259
+ prependListener(event: "sessionError", listener: (err: Error) => void): this;
6260
+ prependListener(event: "socketError", listener: (err: Error) => void): this;
6261
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6262
+ prependListener(event: "timeout", listener: () => void): this;
6263
+
6264
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6265
+ prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6266
+ prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
6267
+ prependOnceListener(event: "socketError", listener: (err: Error) => void): this;
6268
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6269
+ prependOnceListener(event: "timeout", listener: () => void): this;
6270
+ }
6271
+
6272
+ export interface Http2SecureServer extends tls.Server {
6273
+ addListener(event: string, listener: (...args: any[]) => void): this;
6274
+ addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6275
+ addListener(event: "sessionError", listener: (err: Error) => void): this;
6276
+ addListener(event: "socketError", listener: (err: Error) => void): this;
6277
+ addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6278
+ addListener(event: "timeout", listener: () => void): this;
6279
+ addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
6280
+
6281
+ emit(event: string | symbol, ...args: any[]): boolean;
6282
+ emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
6283
+ emit(event: "sessionError", err: Error): boolean;
6284
+ emit(event: "socketError", err: Error): boolean;
6285
+ emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
6286
+ emit(event: "timeout"): boolean;
6287
+ emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean;
6288
+
6289
+ on(event: string, listener: (...args: any[]) => void): this;
6290
+ on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6291
+ on(event: "sessionError", listener: (err: Error) => void): this;
6292
+ on(event: "socketError", listener: (err: Error) => void): this;
6293
+ on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6294
+ on(event: "timeout", listener: () => void): this;
6295
+ on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
6296
+
6297
+ once(event: string, listener: (...args: any[]) => void): this;
6298
+ once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6299
+ once(event: "sessionError", listener: (err: Error) => void): this;
6300
+ once(event: "socketError", listener: (err: Error) => void): this;
6301
+ once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6302
+ once(event: "timeout", listener: () => void): this;
6303
+ once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
6304
+
6305
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6306
+ prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6307
+ prependListener(event: "sessionError", listener: (err: Error) => void): this;
6308
+ prependListener(event: "socketError", listener: (err: Error) => void): this;
6309
+ prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6310
+ prependListener(event: "timeout", listener: () => void): this;
6311
+ prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
6312
+
6313
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6314
+ prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
6315
+ prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
6316
+ prependOnceListener(event: "socketError", listener: (err: Error) => void): this;
6317
+ prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
6318
+ prependOnceListener(event: "timeout", listener: () => void): this;
6319
+ prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
6320
+ }
6321
+
6322
+ export interface Http2ServerRequest extends stream.Readable {
6323
+ headers: IncomingHttpHeaders;
6324
+ httpVersion: string;
6325
+ method: string;
6326
+ rawHeaders: string[];
6327
+ rawTrailers: string[];
6328
+ setTimeout(msecs: number, callback?: () => void): void;
6329
+ socket: net.Socket | tls.TLSSocket;
6330
+ stream: ServerHttp2Stream;
6331
+ trailers: IncomingHttpHeaders;
6332
+ url: string;
6333
+
6334
+ addListener(event: string, listener: (...args: any[]) => void): this;
6335
+ addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6336
+
6337
+ emit(event: string | symbol, ...args: any[]): boolean;
6338
+ emit(event: "aborted", hadError: boolean, code: number): boolean;
6339
+
6340
+ on(event: string, listener: (...args: any[]) => void): this;
6341
+ on(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6342
+
6343
+ once(event: string, listener: (...args: any[]) => void): this;
6344
+ once(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6345
+
6346
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6347
+ prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6348
+
6349
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6350
+ prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6351
+ }
6352
+
6353
+ export interface Http2ServerResponse extends events.EventEmitter {
6354
+ addTrailers(trailers: OutgoingHttpHeaders): void;
6355
+ connection: net.Socket | tls.TLSSocket;
6356
+ end(callback?: () => void): void;
6357
+ end(data?: string | Buffer, callback?: () => void): void;
6358
+ end(data?: string | Buffer, encoding?: string, callback?: () => void): void;
6359
+ readonly finished: boolean;
6360
+ getHeader(name: string): string;
6361
+ getHeaderNames(): string[];
6362
+ getHeaders(): OutgoingHttpHeaders;
6363
+ hasHeader(name: string): boolean;
6364
+ readonly headersSent: boolean;
6365
+ removeHeader(name: string): void;
6366
+ sendDate: boolean;
6367
+ setHeader(name: string, value: number | string | string[]): void;
6368
+ setTimeout(msecs: number, callback?: () => void): void;
6369
+ socket: net.Socket | tls.TLSSocket;
6370
+ statusCode: number;
6371
+ statusMessage: '';
6372
+ stream: ServerHttp2Stream;
6373
+ write(chunk: string | Buffer, callback?: (err: Error) => void): boolean;
6374
+ write(chunk: string | Buffer, encoding?: string, callback?: (err: Error) => void): boolean;
6375
+ writeContinue(): void;
6376
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void;
6377
+ writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders): void;
6378
+ createPushResponse(headers: OutgoingHttpHeaders, callback?: (err: Error) => void): void;
6379
+
6380
+ addListener(event: string, listener: (...args: any[]) => void): this;
6381
+ addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6382
+ addListener(event: "close", listener: () => void): this;
6383
+ addListener(event: "drain", listener: () => void): this;
6384
+ addListener(event: "error", listener: (error: Error) => void): this;
6385
+ addListener(event: "finish", listener: () => void): this;
6386
+
6387
+ emit(event: string | symbol, ...args: any[]): boolean;
6388
+ emit(event: "aborted", hadError: boolean, code: number): boolean;
6389
+ emit(event: "close"): boolean;
6390
+ emit(event: "drain"): boolean;
6391
+ emit(event: "error", error: Error): boolean;
6392
+ emit(event: "finish"): boolean;
6393
+
6394
+ on(event: string, listener: (...args: any[]) => void): this;
6395
+ on(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6396
+ on(event: "close", listener: () => void): this;
6397
+ on(event: "drain", listener: () => void): this;
6398
+ on(event: "error", listener: (error: Error) => void): this;
6399
+ on(event: "finish", listener: () => void): this;
6400
+
6401
+ once(event: string, listener: (...args: any[]) => void): this;
6402
+ once(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6403
+ once(event: "close", listener: () => void): this;
6404
+ once(event: "drain", listener: () => void): this;
6405
+ once(event: "error", listener: (error: Error) => void): this;
6406
+ once(event: "finish", listener: () => void): this;
6407
+
6408
+ prependListener(event: string, listener: (...args: any[]) => void): this;
6409
+ prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6410
+ prependListener(event: "close", listener: () => void): this;
6411
+ prependListener(event: "drain", listener: () => void): this;
6412
+ prependListener(event: "error", listener: (error: Error) => void): this;
6413
+ prependListener(event: "finish", listener: () => void): this;
6414
+
6415
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
6416
+ prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
6417
+ prependOnceListener(event: "close", listener: () => void): this;
6418
+ prependOnceListener(event: "drain", listener: () => void): this;
6419
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
6420
+ prependOnceListener(event: "finish", listener: () => void): this;
6421
+ }
6422
+
6423
+ // Public API
6424
+
6425
+ export const constants: {
6426
+ NGHTTP2_SESSION_SERVER: number;
6427
+ NGHTTP2_SESSION_CLIENT: number;
6428
+ NGHTTP2_STREAM_STATE_IDLE: number;
6429
+ NGHTTP2_STREAM_STATE_OPEN: number;
6430
+ NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
6431
+ NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
6432
+ NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
6433
+ NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
6434
+ NGHTTP2_STREAM_STATE_CLOSED: number;
6435
+ NGHTTP2_NO_ERROR: number;
6436
+ NGHTTP2_PROTOCOL_ERROR: number;
6437
+ NGHTTP2_INTERNAL_ERROR: number;
6438
+ NGHTTP2_FLOW_CONTROL_ERROR: number;
6439
+ NGHTTP2_SETTINGS_TIMEOUT: number;
6440
+ NGHTTP2_STREAM_CLOSED: number;
6441
+ NGHTTP2_FRAME_SIZE_ERROR: number;
6442
+ NGHTTP2_REFUSED_STREAM: number;
6443
+ NGHTTP2_CANCEL: number;
6444
+ NGHTTP2_COMPRESSION_ERROR: number;
6445
+ NGHTTP2_CONNECT_ERROR: number;
6446
+ NGHTTP2_ENHANCE_YOUR_CALM: number;
6447
+ NGHTTP2_INADEQUATE_SECURITY: number;
6448
+ NGHTTP2_HTTP_1_1_REQUIRED: number;
6449
+ NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
6450
+ NGHTTP2_FLAG_NONE: number;
6451
+ NGHTTP2_FLAG_END_STREAM: number;
6452
+ NGHTTP2_FLAG_END_HEADERS: number;
6453
+ NGHTTP2_FLAG_ACK: number;
6454
+ NGHTTP2_FLAG_PADDED: number;
6455
+ NGHTTP2_FLAG_PRIORITY: number;
6456
+ DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
6457
+ DEFAULT_SETTINGS_ENABLE_PUSH: number;
6458
+ DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
6459
+ DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
6460
+ MAX_MAX_FRAME_SIZE: number;
6461
+ MIN_MAX_FRAME_SIZE: number;
6462
+ MAX_INITIAL_WINDOW_SIZE: number;
6463
+ NGHTTP2_DEFAULT_WEIGHT: number;
6464
+ NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
6465
+ NGHTTP2_SETTINGS_ENABLE_PUSH: number;
6466
+ NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
6467
+ NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
6468
+ NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
6469
+ NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
6470
+ PADDING_STRATEGY_NONE: number;
6471
+ PADDING_STRATEGY_MAX: number;
6472
+ PADDING_STRATEGY_CALLBACK: number;
6473
+ HTTP2_HEADER_STATUS: string;
6474
+ HTTP2_HEADER_METHOD: string;
6475
+ HTTP2_HEADER_AUTHORITY: string;
6476
+ HTTP2_HEADER_SCHEME: string;
6477
+ HTTP2_HEADER_PATH: string;
6478
+ HTTP2_HEADER_ACCEPT_CHARSET: string;
6479
+ HTTP2_HEADER_ACCEPT_ENCODING: string;
6480
+ HTTP2_HEADER_ACCEPT_LANGUAGE: string;
6481
+ HTTP2_HEADER_ACCEPT_RANGES: string;
6482
+ HTTP2_HEADER_ACCEPT: string;
6483
+ HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
6484
+ HTTP2_HEADER_AGE: string;
6485
+ HTTP2_HEADER_ALLOW: string;
6486
+ HTTP2_HEADER_AUTHORIZATION: string;
6487
+ HTTP2_HEADER_CACHE_CONTROL: string;
6488
+ HTTP2_HEADER_CONNECTION: string;
6489
+ HTTP2_HEADER_CONTENT_DISPOSITION: string;
6490
+ HTTP2_HEADER_CONTENT_ENCODING: string;
6491
+ HTTP2_HEADER_CONTENT_LANGUAGE: string;
6492
+ HTTP2_HEADER_CONTENT_LENGTH: string;
6493
+ HTTP2_HEADER_CONTENT_LOCATION: string;
6494
+ HTTP2_HEADER_CONTENT_MD5: string;
6495
+ HTTP2_HEADER_CONTENT_RANGE: string;
6496
+ HTTP2_HEADER_CONTENT_TYPE: string;
6497
+ HTTP2_HEADER_COOKIE: string;
6498
+ HTTP2_HEADER_DATE: string;
6499
+ HTTP2_HEADER_ETAG: string;
6500
+ HTTP2_HEADER_EXPECT: string;
6501
+ HTTP2_HEADER_EXPIRES: string;
6502
+ HTTP2_HEADER_FROM: string;
6503
+ HTTP2_HEADER_HOST: string;
6504
+ HTTP2_HEADER_IF_MATCH: string;
6505
+ HTTP2_HEADER_IF_MODIFIED_SINCE: string;
6506
+ HTTP2_HEADER_IF_NONE_MATCH: string;
6507
+ HTTP2_HEADER_IF_RANGE: string;
6508
+ HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
6509
+ HTTP2_HEADER_LAST_MODIFIED: string;
6510
+ HTTP2_HEADER_LINK: string;
6511
+ HTTP2_HEADER_LOCATION: string;
6512
+ HTTP2_HEADER_MAX_FORWARDS: string;
6513
+ HTTP2_HEADER_PREFER: string;
6514
+ HTTP2_HEADER_PROXY_AUTHENTICATE: string;
6515
+ HTTP2_HEADER_PROXY_AUTHORIZATION: string;
6516
+ HTTP2_HEADER_RANGE: string;
6517
+ HTTP2_HEADER_REFERER: string;
6518
+ HTTP2_HEADER_REFRESH: string;
6519
+ HTTP2_HEADER_RETRY_AFTER: string;
6520
+ HTTP2_HEADER_SERVER: string;
6521
+ HTTP2_HEADER_SET_COOKIE: string;
6522
+ HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
6523
+ HTTP2_HEADER_TRANSFER_ENCODING: string;
6524
+ HTTP2_HEADER_TE: string;
6525
+ HTTP2_HEADER_UPGRADE: string;
6526
+ HTTP2_HEADER_USER_AGENT: string;
6527
+ HTTP2_HEADER_VARY: string;
6528
+ HTTP2_HEADER_VIA: string;
6529
+ HTTP2_HEADER_WWW_AUTHENTICATE: string;
6530
+ HTTP2_HEADER_HTTP2_SETTINGS: string;
6531
+ HTTP2_HEADER_KEEP_ALIVE: string;
6532
+ HTTP2_HEADER_PROXY_CONNECTION: string;
6533
+ HTTP2_METHOD_ACL: string;
6534
+ HTTP2_METHOD_BASELINE_CONTROL: string;
6535
+ HTTP2_METHOD_BIND: string;
6536
+ HTTP2_METHOD_CHECKIN: string;
6537
+ HTTP2_METHOD_CHECKOUT: string;
6538
+ HTTP2_METHOD_CONNECT: string;
6539
+ HTTP2_METHOD_COPY: string;
6540
+ HTTP2_METHOD_DELETE: string;
6541
+ HTTP2_METHOD_GET: string;
6542
+ HTTP2_METHOD_HEAD: string;
6543
+ HTTP2_METHOD_LABEL: string;
6544
+ HTTP2_METHOD_LINK: string;
6545
+ HTTP2_METHOD_LOCK: string;
6546
+ HTTP2_METHOD_MERGE: string;
6547
+ HTTP2_METHOD_MKACTIVITY: string;
6548
+ HTTP2_METHOD_MKCALENDAR: string;
6549
+ HTTP2_METHOD_MKCOL: string;
6550
+ HTTP2_METHOD_MKREDIRECTREF: string;
6551
+ HTTP2_METHOD_MKWORKSPACE: string;
6552
+ HTTP2_METHOD_MOVE: string;
6553
+ HTTP2_METHOD_OPTIONS: string;
6554
+ HTTP2_METHOD_ORDERPATCH: string;
6555
+ HTTP2_METHOD_PATCH: string;
6556
+ HTTP2_METHOD_POST: string;
6557
+ HTTP2_METHOD_PRI: string;
6558
+ HTTP2_METHOD_PROPFIND: string;
6559
+ HTTP2_METHOD_PROPPATCH: string;
6560
+ HTTP2_METHOD_PUT: string;
6561
+ HTTP2_METHOD_REBIND: string;
6562
+ HTTP2_METHOD_REPORT: string;
6563
+ HTTP2_METHOD_SEARCH: string;
6564
+ HTTP2_METHOD_TRACE: string;
6565
+ HTTP2_METHOD_UNBIND: string;
6566
+ HTTP2_METHOD_UNCHECKOUT: string;
6567
+ HTTP2_METHOD_UNLINK: string;
6568
+ HTTP2_METHOD_UNLOCK: string;
6569
+ HTTP2_METHOD_UPDATE: string;
6570
+ HTTP2_METHOD_UPDATEREDIRECTREF: string;
6571
+ HTTP2_METHOD_VERSION_CONTROL: string;
6572
+ HTTP_STATUS_CONTINUE: number;
6573
+ HTTP_STATUS_SWITCHING_PROTOCOLS: number;
6574
+ HTTP_STATUS_PROCESSING: number;
6575
+ HTTP_STATUS_OK: number;
6576
+ HTTP_STATUS_CREATED: number;
6577
+ HTTP_STATUS_ACCEPTED: number;
6578
+ HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
6579
+ HTTP_STATUS_NO_CONTENT: number;
6580
+ HTTP_STATUS_RESET_CONTENT: number;
6581
+ HTTP_STATUS_PARTIAL_CONTENT: number;
6582
+ HTTP_STATUS_MULTI_STATUS: number;
6583
+ HTTP_STATUS_ALREADY_REPORTED: number;
6584
+ HTTP_STATUS_IM_USED: number;
6585
+ HTTP_STATUS_MULTIPLE_CHOICES: number;
6586
+ HTTP_STATUS_MOVED_PERMANENTLY: number;
6587
+ HTTP_STATUS_FOUND: number;
6588
+ HTTP_STATUS_SEE_OTHER: number;
6589
+ HTTP_STATUS_NOT_MODIFIED: number;
6590
+ HTTP_STATUS_USE_PROXY: number;
6591
+ HTTP_STATUS_TEMPORARY_REDIRECT: number;
6592
+ HTTP_STATUS_PERMANENT_REDIRECT: number;
6593
+ HTTP_STATUS_BAD_REQUEST: number;
6594
+ HTTP_STATUS_UNAUTHORIZED: number;
6595
+ HTTP_STATUS_PAYMENT_REQUIRED: number;
6596
+ HTTP_STATUS_FORBIDDEN: number;
6597
+ HTTP_STATUS_NOT_FOUND: number;
6598
+ HTTP_STATUS_METHOD_NOT_ALLOWED: number;
6599
+ HTTP_STATUS_NOT_ACCEPTABLE: number;
6600
+ HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
6601
+ HTTP_STATUS_REQUEST_TIMEOUT: number;
6602
+ HTTP_STATUS_CONFLICT: number;
6603
+ HTTP_STATUS_GONE: number;
6604
+ HTTP_STATUS_LENGTH_REQUIRED: number;
6605
+ HTTP_STATUS_PRECONDITION_FAILED: number;
6606
+ HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
6607
+ HTTP_STATUS_URI_TOO_LONG: number;
6608
+ HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
6609
+ HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
6610
+ HTTP_STATUS_EXPECTATION_FAILED: number;
6611
+ HTTP_STATUS_TEAPOT: number;
6612
+ HTTP_STATUS_MISDIRECTED_REQUEST: number;
6613
+ HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
6614
+ HTTP_STATUS_LOCKED: number;
6615
+ HTTP_STATUS_FAILED_DEPENDENCY: number;
6616
+ HTTP_STATUS_UNORDERED_COLLECTION: number;
6617
+ HTTP_STATUS_UPGRADE_REQUIRED: number;
6618
+ HTTP_STATUS_PRECONDITION_REQUIRED: number;
6619
+ HTTP_STATUS_TOO_MANY_REQUESTS: number;
6620
+ HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
6621
+ HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
6622
+ HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
6623
+ HTTP_STATUS_NOT_IMPLEMENTED: number;
6624
+ HTTP_STATUS_BAD_GATEWAY: number;
6625
+ HTTP_STATUS_SERVICE_UNAVAILABLE: number;
6626
+ HTTP_STATUS_GATEWAY_TIMEOUT: number;
6627
+ HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
6628
+ HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
6629
+ HTTP_STATUS_INSUFFICIENT_STORAGE: number;
6630
+ HTTP_STATUS_LOOP_DETECTED: number;
6631
+ HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
6632
+ HTTP_STATUS_NOT_EXTENDED: number;
6633
+ HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
6634
+ };
6635
+
6636
+ export function getDefaultSettings(): Settings;
6637
+ export function getPackedSettings(settings: Settings): Settings;
6638
+ export function getUnpackedSettings(buf: Buffer | Uint8Array): Settings;
6639
+
6640
+ export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
6641
+ export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
6642
+
6643
+ export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
6644
+ export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
6645
+
6646
+ export function connect(authority: string | url.URL, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
6647
+ export function connect(authority: string | url.URL, options?: ClientSessionOptions | SecureClientSessionOptions, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
6648
+ }
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "8.0.22",
3
+ "version": "8.0.26",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -14,47 +14,63 @@
14
14
  },
15
15
  {
16
16
  "name": "Parambir Singh",
17
- "url": "https://github.com/parambirs"
17
+ "url": "https://github.com/parambirs",
18
+ "githubUsername": "parambirs"
18
19
  },
19
20
  {
20
21
  "name": "Roberto Desideri",
21
- "url": "https://github.com/RobDesideri"
22
+ "url": "https://github.com/RobDesideri",
23
+ "githubUsername": "RobDesideri"
22
24
  },
23
25
  {
24
26
  "name": "Christian Vaagland Tellnes",
25
- "url": "https://github.com/tellnes"
27
+ "url": "https://github.com/tellnes",
28
+ "githubUsername": "tellnes"
26
29
  },
27
30
  {
28
31
  "name": "Wilco Bakker",
29
- "url": "https://github.com/WilcoBakker"
32
+ "url": "https://github.com/WilcoBakker",
33
+ "githubUsername": "WilcoBakker"
30
34
  },
31
35
  {
32
36
  "name": "Nicolas Voigt",
33
- "url": "https://github.com/octo-sniffle"
37
+ "url": "https://github.com/octo-sniffle",
38
+ "githubUsername": "octo-sniffle"
34
39
  },
35
40
  {
36
41
  "name": "Chigozirim C.",
37
- "url": "https://github.com/smac89"
42
+ "url": "https://github.com/smac89",
43
+ "githubUsername": "smac89"
38
44
  },
39
45
  {
40
46
  "name": "Flarna",
41
- "url": "https://github.com/Flarna"
47
+ "url": "https://github.com/Flarna",
48
+ "githubUsername": "Flarna"
42
49
  },
43
50
  {
44
51
  "name": "Mariusz Wiktorczyk",
45
- "url": "https://github.com/mwiktorczyk"
52
+ "url": "https://github.com/mwiktorczyk",
53
+ "githubUsername": "mwiktorczyk"
46
54
  },
47
55
  {
48
56
  "name": "wwwy3y3",
49
- "url": "https://github.com/wwwy3y3"
57
+ "url": "https://github.com/wwwy3y3",
58
+ "githubUsername": "wwwy3y3"
50
59
  },
51
60
  {
52
61
  "name": "Daniel Imms",
53
- "url": "https://github.com/Tyriar"
62
+ "url": "https://github.com/Tyriar",
63
+ "githubUsername": "Tyriar"
54
64
  },
55
65
  {
56
66
  "name": "Deividas Bakanas",
57
- "url": "https://github.com/DeividasBakanas"
67
+ "url": "https://github.com/DeividasBakanas",
68
+ "githubUsername": "DeividasBakanas"
69
+ },
70
+ {
71
+ "name": "Kelvin Jin",
72
+ "url": "https://github.com/kjin",
73
+ "githubUsername": "kjin"
58
74
  }
59
75
  ],
60
76
  "main": "",
@@ -64,7 +80,6 @@
64
80
  },
65
81
  "scripts": {},
66
82
  "dependencies": {},
67
- "peerDependencies": {},
68
- "typesPublisherContentHash": "4aee6926317d01e6fa3487f61da5431aef3d4ff2ce236d5b08ad1eb6c7435185",
83
+ "typesPublisherContentHash": "d58897114d5b8a61202a375762d0439e38ee2561924fe0907100ad241214937c",
69
84
  "typeScriptVersion": "2.2"
70
85
  }