@types/node 8.9.1 → 8.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node v8/README.md +2 -2
- node v8/index.d.ts +48 -61
- node v8/package.json +8 -3
node v8/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/v8
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 09 Mar 2018 00:01:00 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>, Oliver Joseph Ash <https://github.com/OliverJAsh>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>.
|
|
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>, Oliver Joseph Ash <https://github.com/OliverJAsh>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Huw <https://github.com/hoo29>.
|
node v8/index.d.ts
CHANGED
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
// Sebastian Silbermann <https://github.com/eps1lon>
|
|
18
18
|
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
|
19
19
|
// Alberto Schiabel <https://github.com/jkomyno>
|
|
20
|
+
// Huw <https://github.com/hoo29>
|
|
20
21
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
22
|
+
// TypeScript Version: 2.1
|
|
21
23
|
|
|
22
24
|
/** inspector module types */
|
|
23
25
|
/// <reference path="./inspector.d.ts" />
|
|
@@ -111,7 +113,7 @@ declare function clearImmediate(immediateId: any): void;
|
|
|
111
113
|
|
|
112
114
|
// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
|
|
113
115
|
interface NodeRequireFunction {
|
|
114
|
-
/* tslint:disable-next-line:callable-types */
|
|
116
|
+
/* tslint:disable-next-line:callable-types */
|
|
115
117
|
(id: string): any;
|
|
116
118
|
}
|
|
117
119
|
|
|
@@ -1733,33 +1735,20 @@ declare module "https" {
|
|
|
1733
1735
|
import * as http from "http";
|
|
1734
1736
|
import { URL } from "url";
|
|
1735
1737
|
|
|
1736
|
-
export
|
|
1737
|
-
pfx?: any;
|
|
1738
|
-
key?: any;
|
|
1739
|
-
passphrase?: string;
|
|
1740
|
-
cert?: any;
|
|
1741
|
-
ca?: any;
|
|
1742
|
-
crl?: any;
|
|
1743
|
-
ciphers?: string;
|
|
1744
|
-
honorCipherOrder?: boolean;
|
|
1745
|
-
requestCert?: boolean;
|
|
1746
|
-
rejectUnauthorized?: boolean;
|
|
1747
|
-
NPNProtocols?: any;
|
|
1748
|
-
SNICallback?: (servername: string, cb: (err: Error | null, ctx: tls.SecureContext) => void) => void;
|
|
1749
|
-
secureProtocol?: string;
|
|
1750
|
-
}
|
|
1738
|
+
export type ServerOptions = tls.SecureContextOptions & tls.TlsOptions;
|
|
1751
1739
|
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
key
|
|
1755
|
-
passphrase
|
|
1756
|
-
cert
|
|
1757
|
-
ca
|
|
1758
|
-
ciphers
|
|
1759
|
-
rejectUnauthorized
|
|
1760
|
-
secureProtocol
|
|
1761
|
-
servername
|
|
1762
|
-
|
|
1740
|
+
// see https://nodejs.org/docs/latest-v8.x/api/https.html#https_https_request_options_callback
|
|
1741
|
+
type extendedRequestKeys = "pfx" |
|
|
1742
|
+
"key" |
|
|
1743
|
+
"passphrase" |
|
|
1744
|
+
"cert" |
|
|
1745
|
+
"ca" |
|
|
1746
|
+
"ciphers" |
|
|
1747
|
+
"rejectUnauthorized" |
|
|
1748
|
+
"secureProtocol" |
|
|
1749
|
+
"servername";
|
|
1750
|
+
|
|
1751
|
+
export type RequestOptions = http.RequestOptions & Pick<tls.ConnectionOptions, extendedRequestKeys>;
|
|
1763
1752
|
|
|
1764
1753
|
export interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
|
|
1765
1754
|
rejectUnauthorized?: boolean;
|
|
@@ -2104,6 +2093,7 @@ declare module "child_process" {
|
|
|
2104
2093
|
killSignal?: string;
|
|
2105
2094
|
uid?: number;
|
|
2106
2095
|
gid?: number;
|
|
2096
|
+
windowsHide?: boolean;
|
|
2107
2097
|
}
|
|
2108
2098
|
|
|
2109
2099
|
export interface ExecOptionsWithStringEncoding extends ExecOptions {
|
|
@@ -2150,6 +2140,7 @@ declare module "child_process" {
|
|
|
2150
2140
|
killSignal?: string;
|
|
2151
2141
|
uid?: number;
|
|
2152
2142
|
gid?: number;
|
|
2143
|
+
windowsHide?: boolean;
|
|
2153
2144
|
windowsVerbatimArguments?: boolean;
|
|
2154
2145
|
}
|
|
2155
2146
|
export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
|
|
@@ -2233,6 +2224,7 @@ declare module "child_process" {
|
|
|
2233
2224
|
maxBuffer?: number;
|
|
2234
2225
|
encoding?: string;
|
|
2235
2226
|
shell?: boolean | string;
|
|
2227
|
+
windowsHide?: boolean;
|
|
2236
2228
|
windowsVerbatimArguments?: boolean;
|
|
2237
2229
|
}
|
|
2238
2230
|
export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
|
|
@@ -2270,6 +2262,7 @@ declare module "child_process" {
|
|
|
2270
2262
|
killSignal?: string;
|
|
2271
2263
|
maxBuffer?: number;
|
|
2272
2264
|
encoding?: string;
|
|
2265
|
+
windowsHide?: boolean;
|
|
2273
2266
|
}
|
|
2274
2267
|
export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
|
|
2275
2268
|
encoding: BufferEncoding;
|
|
@@ -2293,6 +2286,7 @@ declare module "child_process" {
|
|
|
2293
2286
|
killSignal?: string;
|
|
2294
2287
|
maxBuffer?: number;
|
|
2295
2288
|
encoding?: string;
|
|
2289
|
+
windowsHide?: boolean;
|
|
2296
2290
|
}
|
|
2297
2291
|
export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
|
|
2298
2292
|
encoding: BufferEncoding;
|
|
@@ -2614,9 +2608,9 @@ declare module "net" {
|
|
|
2614
2608
|
destroy(err?: any): void;
|
|
2615
2609
|
pause(): this;
|
|
2616
2610
|
resume(): this;
|
|
2617
|
-
setTimeout(timeout: number, callback?: Function):
|
|
2618
|
-
setNoDelay(noDelay?: boolean):
|
|
2619
|
-
setKeepAlive(enable?: boolean, initialDelay?: number):
|
|
2611
|
+
setTimeout(timeout: number, callback?: Function): this;
|
|
2612
|
+
setNoDelay(noDelay?: boolean): this;
|
|
2613
|
+
setKeepAlive(enable?: boolean, initialDelay?: number): this;
|
|
2620
2614
|
address(): { port: number; family: string; address: string; };
|
|
2621
2615
|
unref(): void;
|
|
2622
2616
|
ref(): void;
|
|
@@ -4821,7 +4815,7 @@ declare module "tls" {
|
|
|
4821
4815
|
* An array of strings or a Buffer naming possible NPN protocols.
|
|
4822
4816
|
* (Protocols should be ordered by their priority.)
|
|
4823
4817
|
*/
|
|
4824
|
-
NPNProtocols?: string[] | Buffer,
|
|
4818
|
+
NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array,
|
|
4825
4819
|
/**
|
|
4826
4820
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
4827
4821
|
* (Protocols should be ordered by their priority.) When the server
|
|
@@ -4829,7 +4823,7 @@ declare module "tls" {
|
|
|
4829
4823
|
* precedence over NPN and the server does not send an NPN extension
|
|
4830
4824
|
* to the client.
|
|
4831
4825
|
*/
|
|
4832
|
-
ALPNProtocols?: string[] | Buffer,
|
|
4826
|
+
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array,
|
|
4833
4827
|
/**
|
|
4834
4828
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
4835
4829
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -4884,6 +4878,14 @@ declare module "tls" {
|
|
|
4884
4878
|
getPeerCertificate(detailed: true): DetailedPeerCertificate;
|
|
4885
4879
|
getPeerCertificate(detailed?: false): PeerCertificate;
|
|
4886
4880
|
getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
|
|
4881
|
+
/**
|
|
4882
|
+
* Returns a string containing the negotiated SSL/TLS protocol version of the current connection.
|
|
4883
|
+
* The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process.
|
|
4884
|
+
* The value `null` will be returned for server sockets or disconnected client sockets.
|
|
4885
|
+
* See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information.
|
|
4886
|
+
* @returns negotiated SSL/TLS protocol version of the current connection
|
|
4887
|
+
*/
|
|
4888
|
+
getProtocol(): string | null;
|
|
4887
4889
|
/**
|
|
4888
4890
|
* Could be used to speed up handshake establishment when reconnecting to the server.
|
|
4889
4891
|
* @returns ASN.1 encoded TLS session or undefined if none was negotiated.
|
|
@@ -4905,7 +4907,7 @@ declare module "tls" {
|
|
|
4905
4907
|
* @param callback - callback(err) will be executed with null as err, once the renegotiation
|
|
4906
4908
|
* is successfully completed.
|
|
4907
4909
|
*/
|
|
4908
|
-
renegotiate(options:
|
|
4910
|
+
renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): any;
|
|
4909
4911
|
/**
|
|
4910
4912
|
* Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
4911
4913
|
* Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
|
|
@@ -4948,30 +4950,15 @@ declare module "tls" {
|
|
|
4948
4950
|
prependOnceListener(event: "secureConnect", listener: () => void): this;
|
|
4949
4951
|
}
|
|
4950
4952
|
|
|
4951
|
-
export interface TlsOptions {
|
|
4952
|
-
|
|
4953
|
-
port?: number;
|
|
4954
|
-
pfx?: string | Buffer[];
|
|
4955
|
-
key?: string | string[] | Buffer | any[];
|
|
4956
|
-
passphrase?: string;
|
|
4957
|
-
cert?: string | string[] | Buffer | Buffer[];
|
|
4958
|
-
ca?: string | string[] | Buffer | Buffer[];
|
|
4959
|
-
crl?: string | string[];
|
|
4960
|
-
ciphers?: string;
|
|
4961
|
-
honorCipherOrder?: boolean;
|
|
4953
|
+
export interface TlsOptions extends SecureContextOptions {
|
|
4954
|
+
handshakeTimeout?: number;
|
|
4962
4955
|
requestCert?: boolean;
|
|
4963
4956
|
rejectUnauthorized?: boolean;
|
|
4964
|
-
NPNProtocols?: string[] | Buffer;
|
|
4957
|
+
NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4958
|
+
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4965
4959
|
SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
|
|
4966
|
-
ecdhCurve?: string;
|
|
4967
|
-
dhparam?: string | Buffer;
|
|
4968
|
-
handshakeTimeout?: number;
|
|
4969
|
-
ALPNProtocols?: string[] | Buffer;
|
|
4970
4960
|
sessionTimeout?: number;
|
|
4971
4961
|
ticketKeys?: Buffer;
|
|
4972
|
-
sessionIdContext?: string;
|
|
4973
|
-
secureProtocol?: string;
|
|
4974
|
-
secureOptions?: number;
|
|
4975
4962
|
}
|
|
4976
4963
|
|
|
4977
4964
|
export interface ConnectionOptions extends SecureContextOptions {
|
|
@@ -4980,8 +4967,8 @@ declare module "tls" {
|
|
|
4980
4967
|
path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
4981
4968
|
socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
|
|
4982
4969
|
rejectUnauthorized?: boolean; // Defaults to true
|
|
4983
|
-
NPNProtocols?:
|
|
4984
|
-
ALPNProtocols?:
|
|
4970
|
+
NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4971
|
+
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4985
4972
|
checkServerIdentity?: typeof checkServerIdentity;
|
|
4986
4973
|
servername?: string; // SNI TLS Extension
|
|
4987
4974
|
session?: Buffer;
|
|
@@ -5378,7 +5365,7 @@ declare module "stream" {
|
|
|
5378
5365
|
writable: boolean;
|
|
5379
5366
|
constructor(opts?: WritableOptions);
|
|
5380
5367
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5381
|
-
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5368
|
+
_writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void;
|
|
5382
5369
|
_destroy(err: Error, callback: Function): void;
|
|
5383
5370
|
_final(callback: Function): void;
|
|
5384
5371
|
write(chunk: any, cb?: Function): boolean;
|
|
@@ -5469,7 +5456,7 @@ declare module "stream" {
|
|
|
5469
5456
|
writable: boolean;
|
|
5470
5457
|
constructor(opts?: DuplexOptions);
|
|
5471
5458
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5472
|
-
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5459
|
+
_writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void;
|
|
5473
5460
|
_destroy(err: Error, callback: Function): void;
|
|
5474
5461
|
_final(callback: Function): void;
|
|
5475
5462
|
write(chunk: any, cb?: Function): boolean;
|
|
@@ -5549,9 +5536,9 @@ declare module "util" {
|
|
|
5549
5536
|
export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5550
5537
|
export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5551
5538
|
export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5552
|
-
export function callbackify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3,
|
|
5539
|
+
export function callbackify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5553
5540
|
export function callbackify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5554
|
-
export function callbackify<T1, T2, T3, T4, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4,
|
|
5541
|
+
export function callbackify<T1, T2, T3, T4, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5555
5542
|
export function callbackify<T1, T2, T3, T4, T5>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5556
5543
|
export function callbackify<T1, T2, T3, T4, T5, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5557
5544
|
export function callbackify<T1, T2, T3, T4, T5, T6>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
@@ -5625,12 +5612,12 @@ declare module "tty" {
|
|
|
5625
5612
|
import * as net from "net";
|
|
5626
5613
|
|
|
5627
5614
|
export function isatty(fd: number): boolean;
|
|
5628
|
-
export
|
|
5615
|
+
export class ReadStream extends net.Socket {
|
|
5629
5616
|
isRaw: boolean;
|
|
5630
5617
|
setRawMode(mode: boolean): void;
|
|
5631
5618
|
isTTY: boolean;
|
|
5632
5619
|
}
|
|
5633
|
-
export
|
|
5620
|
+
export class WriteStream extends net.Socket {
|
|
5634
5621
|
columns: number;
|
|
5635
5622
|
rows: number;
|
|
5636
5623
|
isTTY: boolean;
|
|
@@ -6146,7 +6133,7 @@ declare module "http2" {
|
|
|
6146
6133
|
}
|
|
6147
6134
|
|
|
6148
6135
|
export interface ServerStreamFileResponseOptions {
|
|
6149
|
-
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void|boolean;
|
|
6136
|
+
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean;
|
|
6150
6137
|
getTrailers?: (trailers: OutgoingHttpHeaders) => void;
|
|
6151
6138
|
offset?: number;
|
|
6152
6139
|
length?: number;
|
node v8/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.5",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -86,6 +86,11 @@
|
|
|
86
86
|
"name": "Alberto Schiabel",
|
|
87
87
|
"url": "https://github.com/jkomyno",
|
|
88
88
|
"githubUsername": "jkomyno"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "Huw",
|
|
92
|
+
"url": "https://github.com/hoo29",
|
|
93
|
+
"githubUsername": "hoo29"
|
|
89
94
|
}
|
|
90
95
|
],
|
|
91
96
|
"main": "",
|
|
@@ -95,6 +100,6 @@
|
|
|
95
100
|
},
|
|
96
101
|
"scripts": {},
|
|
97
102
|
"dependencies": {},
|
|
98
|
-
"typesPublisherContentHash": "
|
|
99
|
-
"typeScriptVersion": "2.
|
|
103
|
+
"typesPublisherContentHash": "a07078094e2c211481ee1e42c2803623fdd21ba0b36d2344aa09d1d21279c17b",
|
|
104
|
+
"typeScriptVersion": "2.1"
|
|
100
105
|
}
|