@types/node 8.9.0 → 8.9.4
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 +38 -64
- 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: Tue, 13 Feb 2018 20:54:40 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;
|
|
@@ -2614,9 +2603,9 @@ declare module "net" {
|
|
|
2614
2603
|
destroy(err?: any): void;
|
|
2615
2604
|
pause(): this;
|
|
2616
2605
|
resume(): this;
|
|
2617
|
-
setTimeout(timeout: number, callback?: Function):
|
|
2618
|
-
setNoDelay(noDelay?: boolean):
|
|
2619
|
-
setKeepAlive(enable?: boolean, initialDelay?: number):
|
|
2606
|
+
setTimeout(timeout: number, callback?: Function): this;
|
|
2607
|
+
setNoDelay(noDelay?: boolean): this;
|
|
2608
|
+
setKeepAlive(enable?: boolean, initialDelay?: number): this;
|
|
2620
2609
|
address(): { port: number; family: string; address: string; };
|
|
2621
2610
|
unref(): void;
|
|
2622
2611
|
ref(): void;
|
|
@@ -3698,7 +3687,7 @@ declare module "fs" {
|
|
|
3698
3687
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3699
3688
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3700
3689
|
*/
|
|
3701
|
-
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files:
|
|
3690
|
+
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[] | Buffer[]) => void): void;
|
|
3702
3691
|
|
|
3703
3692
|
/**
|
|
3704
3693
|
* Asynchronous readdir(3) - read a directory.
|
|
@@ -3727,7 +3716,7 @@ declare module "fs" {
|
|
|
3727
3716
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3728
3717
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3729
3718
|
*/
|
|
3730
|
-
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<
|
|
3719
|
+
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string[] | Buffer[]>;
|
|
3731
3720
|
}
|
|
3732
3721
|
|
|
3733
3722
|
/**
|
|
@@ -3749,7 +3738,7 @@ declare module "fs" {
|
|
|
3749
3738
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3750
3739
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3751
3740
|
*/
|
|
3752
|
-
export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null):
|
|
3741
|
+
export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): string[] | Buffer[];
|
|
3753
3742
|
|
|
3754
3743
|
/**
|
|
3755
3744
|
* Asynchronous close(2) - close a file descriptor.
|
|
@@ -4821,7 +4810,7 @@ declare module "tls" {
|
|
|
4821
4810
|
* An array of strings or a Buffer naming possible NPN protocols.
|
|
4822
4811
|
* (Protocols should be ordered by their priority.)
|
|
4823
4812
|
*/
|
|
4824
|
-
NPNProtocols?: string[] | Buffer,
|
|
4813
|
+
NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array,
|
|
4825
4814
|
/**
|
|
4826
4815
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
4827
4816
|
* (Protocols should be ordered by their priority.) When the server
|
|
@@ -4829,7 +4818,7 @@ declare module "tls" {
|
|
|
4829
4818
|
* precedence over NPN and the server does not send an NPN extension
|
|
4830
4819
|
* to the client.
|
|
4831
4820
|
*/
|
|
4832
|
-
ALPNProtocols?: string[] | Buffer,
|
|
4821
|
+
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array,
|
|
4833
4822
|
/**
|
|
4834
4823
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
4835
4824
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -4905,7 +4894,7 @@ declare module "tls" {
|
|
|
4905
4894
|
* @param callback - callback(err) will be executed with null as err, once the renegotiation
|
|
4906
4895
|
* is successfully completed.
|
|
4907
4896
|
*/
|
|
4908
|
-
renegotiate(options:
|
|
4897
|
+
renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): any;
|
|
4909
4898
|
/**
|
|
4910
4899
|
* Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
4911
4900
|
* Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
|
|
@@ -4948,30 +4937,15 @@ declare module "tls" {
|
|
|
4948
4937
|
prependOnceListener(event: "secureConnect", listener: () => void): this;
|
|
4949
4938
|
}
|
|
4950
4939
|
|
|
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;
|
|
4940
|
+
export interface TlsOptions extends SecureContextOptions {
|
|
4941
|
+
handshakeTimeout?: number;
|
|
4962
4942
|
requestCert?: boolean;
|
|
4963
4943
|
rejectUnauthorized?: boolean;
|
|
4964
|
-
NPNProtocols?: string[] | Buffer;
|
|
4944
|
+
NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4945
|
+
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4965
4946
|
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
4947
|
sessionTimeout?: number;
|
|
4971
4948
|
ticketKeys?: Buffer;
|
|
4972
|
-
sessionIdContext?: string;
|
|
4973
|
-
secureProtocol?: string;
|
|
4974
|
-
secureOptions?: number;
|
|
4975
4949
|
}
|
|
4976
4950
|
|
|
4977
4951
|
export interface ConnectionOptions extends SecureContextOptions {
|
|
@@ -4980,8 +4954,8 @@ declare module "tls" {
|
|
|
4980
4954
|
path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
4981
4955
|
socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
|
|
4982
4956
|
rejectUnauthorized?: boolean; // Defaults to true
|
|
4983
|
-
NPNProtocols?:
|
|
4984
|
-
ALPNProtocols?:
|
|
4957
|
+
NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4958
|
+
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4985
4959
|
checkServerIdentity?: typeof checkServerIdentity;
|
|
4986
4960
|
servername?: string; // SNI TLS Extension
|
|
4987
4961
|
session?: Buffer;
|
|
@@ -5378,7 +5352,7 @@ declare module "stream" {
|
|
|
5378
5352
|
writable: boolean;
|
|
5379
5353
|
constructor(opts?: WritableOptions);
|
|
5380
5354
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5381
|
-
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5355
|
+
_writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void;
|
|
5382
5356
|
_destroy(err: Error, callback: Function): void;
|
|
5383
5357
|
_final(callback: Function): void;
|
|
5384
5358
|
write(chunk: any, cb?: Function): boolean;
|
|
@@ -5469,7 +5443,7 @@ declare module "stream" {
|
|
|
5469
5443
|
writable: boolean;
|
|
5470
5444
|
constructor(opts?: DuplexOptions);
|
|
5471
5445
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5472
|
-
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5446
|
+
_writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (err?: Error) => void): void;
|
|
5473
5447
|
_destroy(err: Error, callback: Function): void;
|
|
5474
5448
|
_final(callback: Function): void;
|
|
5475
5449
|
write(chunk: any, cb?: Function): boolean;
|
|
@@ -5549,9 +5523,9 @@ declare module "util" {
|
|
|
5549
5523
|
export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5550
5524
|
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
5525
|
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,
|
|
5526
|
+
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
5527
|
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,
|
|
5528
|
+
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
5529
|
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
5530
|
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
5531
|
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 +5599,12 @@ declare module "tty" {
|
|
|
5625
5599
|
import * as net from "net";
|
|
5626
5600
|
|
|
5627
5601
|
export function isatty(fd: number): boolean;
|
|
5628
|
-
export
|
|
5602
|
+
export class ReadStream extends net.Socket {
|
|
5629
5603
|
isRaw: boolean;
|
|
5630
5604
|
setRawMode(mode: boolean): void;
|
|
5631
5605
|
isTTY: boolean;
|
|
5632
5606
|
}
|
|
5633
|
-
export
|
|
5607
|
+
export class WriteStream extends net.Socket {
|
|
5634
5608
|
columns: number;
|
|
5635
5609
|
rows: number;
|
|
5636
5610
|
isTTY: boolean;
|
|
@@ -6146,7 +6120,7 @@ declare module "http2" {
|
|
|
6146
6120
|
}
|
|
6147
6121
|
|
|
6148
6122
|
export interface ServerStreamFileResponseOptions {
|
|
6149
|
-
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void|boolean;
|
|
6123
|
+
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean;
|
|
6150
6124
|
getTrailers?: (trailers: OutgoingHttpHeaders) => void;
|
|
6151
6125
|
offset?: number;
|
|
6152
6126
|
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.4",
|
|
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": "c57e8e80888027a0dcee1e3158dc571f6a16b8488c41d19cb72f78e3d52ddb45",
|
|
104
|
+
"typeScriptVersion": "2.1"
|
|
100
105
|
}
|