@types/node 10.5.6 → 10.7.1
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/README.md +2 -2
- node/index.d.ts +165 -69
- node/package.json +12 -2
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 15 Aug 2018 20:42:04 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Klaus Meinhardt <https://github.com/ajafff>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Mohsen Azimi <https://github.com/mohsen1>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Alexander T. <https://github.com/a-tarasyuk>, Lishude <https://github.com/islishude>, Andrew Makarov <https://github.com/r3nya>, Zane Hannan AU <https://github.com/ZaneHannanAU>.
|
|
16
|
+
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Klaus Meinhardt <https://github.com/ajafff>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Mohsen Azimi <https://github.com/mohsen1>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Alexander T. <https://github.com/a-tarasyuk>, Lishude <https://github.com/islishude>, Andrew Makarov <https://github.com/r3nya>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Thomas den Hollander <https://github.com/ThomasdenH>, Eugene Y. Q. Shen <https://github.com/eyqs>.
|
node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Node.js 10.
|
|
1
|
+
// Type definitions for Node.js 10.7.x
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
// Lishude <https://github.com/islishude>
|
|
27
27
|
// Andrew Makarov <https://github.com/r3nya>
|
|
28
28
|
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
|
29
|
+
// Thomas den Hollander <https://github.com/ThomasdenH>
|
|
30
|
+
// Eugene Y. Q. Shen <https://github.com/eyqs>
|
|
29
31
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
30
32
|
|
|
31
33
|
/** inspector module types */
|
|
@@ -171,6 +173,10 @@ interface SymbolConstructor {
|
|
|
171
173
|
readonly asyncIterator: symbol;
|
|
172
174
|
}
|
|
173
175
|
declare var Symbol: SymbolConstructor;
|
|
176
|
+
interface SharedArrayBuffer {
|
|
177
|
+
readonly byteLength: number;
|
|
178
|
+
slice(begin?: number, end?: number): SharedArrayBuffer;
|
|
179
|
+
}
|
|
174
180
|
|
|
175
181
|
// Node.js ESNEXT support
|
|
176
182
|
interface String {
|
|
@@ -348,13 +354,13 @@ declare var Buffer: {
|
|
|
348
354
|
new(array: Uint8Array): Buffer;
|
|
349
355
|
/**
|
|
350
356
|
* Produces a Buffer backed by the same allocated memory as
|
|
351
|
-
* the given {ArrayBuffer}.
|
|
357
|
+
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
352
358
|
*
|
|
353
359
|
*
|
|
354
360
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
355
361
|
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
356
362
|
*/
|
|
357
|
-
new(arrayBuffer: ArrayBuffer): Buffer;
|
|
363
|
+
new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
|
|
358
364
|
/**
|
|
359
365
|
* Allocates a new buffer containing the given {array} of octets.
|
|
360
366
|
*
|
|
@@ -378,8 +384,7 @@ declare var Buffer: {
|
|
|
378
384
|
*
|
|
379
385
|
* @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
|
|
380
386
|
*/
|
|
381
|
-
from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
382
|
-
// from(arrayBuffer: SharedArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
387
|
+
from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
383
388
|
/**
|
|
384
389
|
* Creates a new Buffer using the passed {data}
|
|
385
390
|
* @param data data to create a new Buffer
|
|
@@ -417,7 +422,7 @@ declare var Buffer: {
|
|
|
417
422
|
* @param string string to test.
|
|
418
423
|
* @param encoding encoding used to evaluate (defaults to 'utf8')
|
|
419
424
|
*/
|
|
420
|
-
byteLength(string: string | NodeJS.TypedArray | DataView | ArrayBuffer
|
|
425
|
+
byteLength(string: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer, encoding?: string): number;
|
|
421
426
|
/**
|
|
422
427
|
* Returns a buffer which is the result of concatenating all the buffers in the list together.
|
|
423
428
|
*
|
|
@@ -1247,6 +1252,10 @@ declare module "http" {
|
|
|
1247
1252
|
* Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
|
|
1248
1253
|
*/
|
|
1249
1254
|
maxFreeSockets?: number;
|
|
1255
|
+
/**
|
|
1256
|
+
* Socket timeout in milliseconds. This will set the timeout after the socket is connected.
|
|
1257
|
+
*/
|
|
1258
|
+
timeout?: number;
|
|
1250
1259
|
}
|
|
1251
1260
|
|
|
1252
1261
|
export class Agent {
|
|
@@ -2189,11 +2198,13 @@ declare module "child_process" {
|
|
|
2189
2198
|
keepOpen?: boolean;
|
|
2190
2199
|
}
|
|
2191
2200
|
|
|
2201
|
+
export type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | stream.Stream | number | null | undefined)>;
|
|
2202
|
+
|
|
2192
2203
|
export interface SpawnOptions {
|
|
2193
|
-
argv0?: string;
|
|
2194
2204
|
cwd?: string;
|
|
2195
|
-
env?:
|
|
2196
|
-
|
|
2205
|
+
env?: NodeJS.ProcessEnv;
|
|
2206
|
+
argv0?: string;
|
|
2207
|
+
stdio?: StdioOptions;
|
|
2197
2208
|
detached?: boolean;
|
|
2198
2209
|
uid?: number;
|
|
2199
2210
|
gid?: number;
|
|
@@ -2206,7 +2217,7 @@ declare module "child_process" {
|
|
|
2206
2217
|
|
|
2207
2218
|
export interface ExecOptions {
|
|
2208
2219
|
cwd?: string;
|
|
2209
|
-
env?:
|
|
2220
|
+
env?: NodeJS.ProcessEnv;
|
|
2210
2221
|
shell?: string;
|
|
2211
2222
|
timeout?: number;
|
|
2212
2223
|
maxBuffer?: number;
|
|
@@ -2261,7 +2272,7 @@ declare module "child_process" {
|
|
|
2261
2272
|
|
|
2262
2273
|
export interface ExecFileOptions {
|
|
2263
2274
|
cwd?: string;
|
|
2264
|
-
env?:
|
|
2275
|
+
env?: NodeJS.ProcessEnv;
|
|
2265
2276
|
timeout?: number;
|
|
2266
2277
|
maxBuffer?: number;
|
|
2267
2278
|
killSignal?: string;
|
|
@@ -2328,32 +2339,32 @@ declare module "child_process" {
|
|
|
2328
2339
|
|
|
2329
2340
|
export interface ForkOptions {
|
|
2330
2341
|
cwd?: string;
|
|
2331
|
-
env?:
|
|
2342
|
+
env?: NodeJS.ProcessEnv;
|
|
2332
2343
|
execPath?: string;
|
|
2333
2344
|
execArgv?: string[];
|
|
2334
2345
|
silent?: boolean;
|
|
2335
|
-
stdio?:
|
|
2346
|
+
stdio?: StdioOptions;
|
|
2347
|
+
windowsVerbatimArguments?: boolean;
|
|
2336
2348
|
uid?: number;
|
|
2337
2349
|
gid?: number;
|
|
2338
|
-
windowsVerbatimArguments?: boolean;
|
|
2339
2350
|
}
|
|
2340
2351
|
export function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
|
|
2341
2352
|
|
|
2342
2353
|
export interface SpawnSyncOptions {
|
|
2343
|
-
argv0?: string;
|
|
2354
|
+
argv0?: string; // Not specified in the docs
|
|
2344
2355
|
cwd?: string;
|
|
2345
|
-
input?: string | Buffer;
|
|
2346
|
-
stdio?:
|
|
2347
|
-
env?:
|
|
2356
|
+
input?: string | Buffer | Uint8Array;
|
|
2357
|
+
stdio?: StdioOptions;
|
|
2358
|
+
env?: NodeJS.ProcessEnv;
|
|
2348
2359
|
uid?: number;
|
|
2349
2360
|
gid?: number;
|
|
2350
2361
|
timeout?: number;
|
|
2351
|
-
killSignal?: string;
|
|
2362
|
+
killSignal?: string | number;
|
|
2352
2363
|
maxBuffer?: number;
|
|
2353
2364
|
encoding?: string;
|
|
2354
2365
|
shell?: boolean | string;
|
|
2355
|
-
windowsHide?: boolean;
|
|
2356
2366
|
windowsVerbatimArguments?: boolean;
|
|
2367
|
+
windowsHide?: boolean;
|
|
2357
2368
|
}
|
|
2358
2369
|
export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
|
|
2359
2370
|
encoding: BufferEncoding;
|
|
@@ -2380,14 +2391,14 @@ declare module "child_process" {
|
|
|
2380
2391
|
|
|
2381
2392
|
export interface ExecSyncOptions {
|
|
2382
2393
|
cwd?: string;
|
|
2383
|
-
input?: string | Buffer;
|
|
2384
|
-
stdio?:
|
|
2385
|
-
env?:
|
|
2394
|
+
input?: string | Buffer | Uint8Array;
|
|
2395
|
+
stdio?: StdioOptions;
|
|
2396
|
+
env?: NodeJS.ProcessEnv;
|
|
2386
2397
|
shell?: string;
|
|
2387
2398
|
uid?: number;
|
|
2388
2399
|
gid?: number;
|
|
2389
2400
|
timeout?: number;
|
|
2390
|
-
killSignal?: string;
|
|
2401
|
+
killSignal?: string | number;
|
|
2391
2402
|
maxBuffer?: number;
|
|
2392
2403
|
encoding?: string;
|
|
2393
2404
|
windowsHide?: boolean;
|
|
@@ -2405,16 +2416,17 @@ declare module "child_process" {
|
|
|
2405
2416
|
|
|
2406
2417
|
export interface ExecFileSyncOptions {
|
|
2407
2418
|
cwd?: string;
|
|
2408
|
-
input?: string | Buffer;
|
|
2409
|
-
stdio?:
|
|
2410
|
-
env?:
|
|
2419
|
+
input?: string | Buffer | Uint8Array;
|
|
2420
|
+
stdio?: StdioOptions;
|
|
2421
|
+
env?: NodeJS.ProcessEnv;
|
|
2411
2422
|
uid?: number;
|
|
2412
2423
|
gid?: number;
|
|
2413
2424
|
timeout?: number;
|
|
2414
|
-
killSignal?: string;
|
|
2425
|
+
killSignal?: string | number;
|
|
2415
2426
|
maxBuffer?: number;
|
|
2416
2427
|
encoding?: string;
|
|
2417
2428
|
windowsHide?: boolean;
|
|
2429
|
+
shell?: boolean | string;
|
|
2418
2430
|
}
|
|
2419
2431
|
export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
|
|
2420
2432
|
encoding: BufferEncoding;
|
|
@@ -2578,8 +2590,15 @@ declare module "dns" {
|
|
|
2578
2590
|
ttl: number;
|
|
2579
2591
|
}
|
|
2580
2592
|
|
|
2581
|
-
|
|
2582
|
-
|
|
2593
|
+
/** @deprecated Use AnyARecord or AnyAaaaRecord instead. */
|
|
2594
|
+
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
|
2595
|
+
|
|
2596
|
+
export interface AnyARecord extends RecordWithTtl {
|
|
2597
|
+
type: "A";
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
export interface AnyAaaaRecord extends RecordWithTtl {
|
|
2601
|
+
type: "AAAA";
|
|
2583
2602
|
}
|
|
2584
2603
|
|
|
2585
2604
|
export interface MxRecord {
|
|
@@ -2634,10 +2653,36 @@ declare module "dns" {
|
|
|
2634
2653
|
entries: string[];
|
|
2635
2654
|
}
|
|
2636
2655
|
|
|
2656
|
+
export interface AnyNsRecord {
|
|
2657
|
+
type: "NS";
|
|
2658
|
+
value: string;
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2661
|
+
export interface AnyPtrRecord {
|
|
2662
|
+
type: "PTR";
|
|
2663
|
+
value: string;
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
export interface AnyCnameRecord {
|
|
2667
|
+
type: "CNAME";
|
|
2668
|
+
value: string;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
export type AnyRecord = AnyARecord |
|
|
2672
|
+
AnyAaaaRecord |
|
|
2673
|
+
AnyCnameRecord |
|
|
2674
|
+
AnyMxRecord |
|
|
2675
|
+
AnyNaptrRecord |
|
|
2676
|
+
AnyNsRecord |
|
|
2677
|
+
AnyPtrRecord |
|
|
2678
|
+
AnySoaRecord |
|
|
2679
|
+
AnySrvRecord |
|
|
2680
|
+
AnyTxtRecord;
|
|
2681
|
+
|
|
2637
2682
|
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2638
2683
|
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2639
2684
|
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2640
|
-
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses:
|
|
2685
|
+
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
|
2641
2686
|
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2642
2687
|
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2643
2688
|
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
@@ -2646,18 +2691,18 @@ declare module "dns" {
|
|
|
2646
2691
|
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
|
2647
2692
|
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2648
2693
|
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2649
|
-
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
|
2694
|
+
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void): void;
|
|
2650
2695
|
|
|
2651
2696
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2652
2697
|
export namespace resolve {
|
|
2653
2698
|
export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
2654
|
-
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<
|
|
2699
|
+
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
2655
2700
|
export function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
2656
2701
|
export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
2657
2702
|
export function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
2658
2703
|
export function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
2659
2704
|
export function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
2660
|
-
export function __promisify__(hostname: string, rrtype
|
|
2705
|
+
export function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
|
2661
2706
|
}
|
|
2662
2707
|
|
|
2663
2708
|
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
@@ -2682,18 +2727,54 @@ declare module "dns" {
|
|
|
2682
2727
|
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
2683
2728
|
}
|
|
2684
2729
|
|
|
2685
|
-
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: ReadonlyArray<AnySrvRecord | AnySoaRecord | AnyNaptrRecord | AnyRecordWithTtl | AnyMxRecord | AnyTxtRecord>) => void): void;
|
|
2686
2730
|
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2731
|
+
export namespace resolveCname {
|
|
2732
|
+
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2687
2735
|
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2736
|
+
export namespace resolveMx {
|
|
2737
|
+
export function __promisify__(hostname: string): Promise<MxRecord[]>;
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2688
2740
|
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
2741
|
+
export namespace resolveNaptr {
|
|
2742
|
+
export function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2689
2745
|
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2746
|
+
export namespace resolveNs {
|
|
2747
|
+
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2690
2750
|
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2751
|
+
export namespace resolvePtr {
|
|
2752
|
+
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2691
2755
|
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
|
2756
|
+
export namespace resolveSoa {
|
|
2757
|
+
export function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2692
2760
|
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2761
|
+
export namespace resolveSrv {
|
|
2762
|
+
export function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2693
2765
|
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2766
|
+
export namespace resolveTxt {
|
|
2767
|
+
export function __promisify__(hostname: string): Promise<string[][]>;
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
|
2771
|
+
export namespace resolveAny {
|
|
2772
|
+
export function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
|
2773
|
+
}
|
|
2694
2774
|
|
|
2695
2775
|
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
|
2696
2776
|
export function setServers(servers: string[]): void;
|
|
2777
|
+
export function getServers(): string[];
|
|
2697
2778
|
|
|
2698
2779
|
// Error codes
|
|
2699
2780
|
export var NODATA: string;
|
|
@@ -2720,6 +2801,25 @@ declare module "dns" {
|
|
|
2720
2801
|
export var LOADIPHLPAPI: string;
|
|
2721
2802
|
export var ADDRGETNETWORKPARAMS: string;
|
|
2722
2803
|
export var CANCELLED: string;
|
|
2804
|
+
|
|
2805
|
+
export class Resolver {
|
|
2806
|
+
getServers: typeof getServers;
|
|
2807
|
+
setServers: typeof setServers;
|
|
2808
|
+
resolve: typeof resolve;
|
|
2809
|
+
resolve4: typeof resolve4;
|
|
2810
|
+
resolve6: typeof resolve6;
|
|
2811
|
+
resolveAny: typeof resolveAny;
|
|
2812
|
+
resolveCname: typeof resolveCname;
|
|
2813
|
+
resolveMx: typeof resolveMx;
|
|
2814
|
+
resolveNaptr: typeof resolveNaptr;
|
|
2815
|
+
resolveNs: typeof resolveNs;
|
|
2816
|
+
resolvePtr: typeof resolvePtr;
|
|
2817
|
+
resolveSoa: typeof resolveSoa;
|
|
2818
|
+
resolveSrv: typeof resolveSrv;
|
|
2819
|
+
resolveTxt: typeof resolveTxt;
|
|
2820
|
+
reverse: typeof reverse;
|
|
2821
|
+
cancel(): void;
|
|
2822
|
+
}
|
|
2723
2823
|
}
|
|
2724
2824
|
|
|
2725
2825
|
declare module "net" {
|
|
@@ -5862,8 +5962,8 @@ declare module "crypto" {
|
|
|
5862
5962
|
export interface Signer extends NodeJS.WritableStream {
|
|
5863
5963
|
update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer;
|
|
5864
5964
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
|
|
5865
|
-
sign(private_key: string | { key: string; passphrase: string }): Buffer;
|
|
5866
|
-
sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string;
|
|
5965
|
+
sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }): Buffer;
|
|
5966
|
+
sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string;
|
|
5867
5967
|
}
|
|
5868
5968
|
export function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
|
|
5869
5969
|
export interface Verify extends NodeJS.WritableStream {
|
|
@@ -6381,7 +6481,7 @@ declare module "util" {
|
|
|
6381
6481
|
}
|
|
6382
6482
|
|
|
6383
6483
|
declare module "assert" {
|
|
6384
|
-
function internal(value: any, message?: string): void;
|
|
6484
|
+
function internal(value: any, message?: string | Error): void;
|
|
6385
6485
|
namespace internal {
|
|
6386
6486
|
export class AssertionError implements Error {
|
|
6387
6487
|
name: string;
|
|
@@ -6390,46 +6490,42 @@ declare module "assert" {
|
|
|
6390
6490
|
expected: any;
|
|
6391
6491
|
operator: string;
|
|
6392
6492
|
generatedMessage: boolean;
|
|
6493
|
+
code: 'ERR_ASSERTION';
|
|
6393
6494
|
|
|
6394
6495
|
constructor(options?: {
|
|
6395
6496
|
message?: string; actual?: any; expected?: any;
|
|
6396
|
-
operator?: string;
|
|
6497
|
+
operator?: string; stackStartFn?: Function
|
|
6397
6498
|
});
|
|
6398
6499
|
}
|
|
6399
6500
|
|
|
6400
|
-
export function fail(message
|
|
6401
|
-
/** @deprecated since v10.0.0 */
|
|
6402
|
-
export function fail(actual: any, expected: any, message?: string, operator?: string): never;
|
|
6403
|
-
export function ok(value: any, message?: string): void;
|
|
6404
|
-
/** @deprecated use strictEqual() */
|
|
6405
|
-
export function equal(actual: any, expected: any, message?: string): void;
|
|
6406
|
-
/** @deprecated use notStrictEqual() */
|
|
6407
|
-
export function notEqual(actual: any, expected: any, message?: string): void;
|
|
6408
|
-
/** @deprecated use deepStrictEqual() */
|
|
6409
|
-
export function deepEqual(actual: any, expected: any, message?: string): void;
|
|
6410
|
-
/** @deprecated use notDeepStrictEqual() */
|
|
6411
|
-
export function notDeepEqual(
|
|
6412
|
-
export function strictEqual(actual: any, expected: any, message?: string): void;
|
|
6413
|
-
export function notStrictEqual(actual: any, expected: any, message?: string): void;
|
|
6414
|
-
export function deepStrictEqual(actual: any, expected: any, message?: string): void;
|
|
6415
|
-
export function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
|
|
6416
|
-
|
|
6417
|
-
export function throws(block: Function, message?: string): void;
|
|
6418
|
-
export function throws(block: Function, error: Function, message?: string): void;
|
|
6419
|
-
export function
|
|
6420
|
-
export function
|
|
6421
|
-
|
|
6422
|
-
export function doesNotThrow(block: Function, message?: string): void;
|
|
6423
|
-
export function doesNotThrow(block: Function, error: Function, message?: string): void;
|
|
6424
|
-
export function doesNotThrow(block: Function, error: RegExp, message?: string): void;
|
|
6425
|
-
export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void;
|
|
6501
|
+
export function fail(message?: string | Error): never;
|
|
6502
|
+
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
6503
|
+
export function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
|
|
6504
|
+
export function ok(value: any, message?: string | Error): void;
|
|
6505
|
+
/** @deprecated since v9.9.0 - use strictEqual() instead. */
|
|
6506
|
+
export function equal(actual: any, expected: any, message?: string | Error): void;
|
|
6507
|
+
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
|
|
6508
|
+
export function notEqual(actual: any, expected: any, message?: string | Error): void;
|
|
6509
|
+
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
|
|
6510
|
+
export function deepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
6511
|
+
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
|
|
6512
|
+
export function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
6513
|
+
export function strictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
6514
|
+
export function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
6515
|
+
export function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
6516
|
+
export function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
6517
|
+
|
|
6518
|
+
export function throws(block: Function, message?: string | Error): void;
|
|
6519
|
+
export function throws(block: Function, error: RegExp | Function | Object | Error, message?: string | Error): void;
|
|
6520
|
+
export function doesNotThrow(block: Function, message?: string | Error): void;
|
|
6521
|
+
export function doesNotThrow(block: Function, error: RegExp | Function, message?: string | Error): void;
|
|
6426
6522
|
|
|
6427
6523
|
export function ifError(value: any): void;
|
|
6428
6524
|
|
|
6429
|
-
export function rejects(block: Function | Promise<any>, message?: string): Promise<void>;
|
|
6430
|
-
export function rejects(block: Function | Promise<any>, error:
|
|
6431
|
-
export function doesNotReject(block: Function | Promise<any>, message?: string): Promise<void>;
|
|
6432
|
-
export function doesNotReject(block: Function | Promise<any>, error:
|
|
6525
|
+
export function rejects(block: Function | Promise<any>, message?: string | Error): Promise<void>;
|
|
6526
|
+
export function rejects(block: Function | Promise<any>, error: RegExp | Function | Object | Error, message?: string | Error): Promise<void>;
|
|
6527
|
+
export function doesNotReject(block: Function | Promise<any>, message?: string | Error): Promise<void>;
|
|
6528
|
+
export function doesNotReject(block: Function | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
|
|
6433
6529
|
|
|
6434
6530
|
export var strict: typeof internal;
|
|
6435
6531
|
}
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.1",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -131,6 +131,16 @@
|
|
|
131
131
|
"name": "Zane Hannan AU",
|
|
132
132
|
"url": "https://github.com/ZaneHannanAU",
|
|
133
133
|
"githubUsername": "ZaneHannanAU"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "Thomas den Hollander",
|
|
137
|
+
"url": "https://github.com/ThomasdenH",
|
|
138
|
+
"githubUsername": "ThomasdenH"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "Eugene Y. Q. Shen",
|
|
142
|
+
"url": "https://github.com/eyqs",
|
|
143
|
+
"githubUsername": "eyqs"
|
|
134
144
|
}
|
|
135
145
|
],
|
|
136
146
|
"main": "",
|
|
@@ -140,6 +150,6 @@
|
|
|
140
150
|
},
|
|
141
151
|
"scripts": {},
|
|
142
152
|
"dependencies": {},
|
|
143
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "248a5d08053aa55026b11f7bef8cdcfc8ec8a2aef60811060baca74a735bf1bd",
|
|
144
154
|
"typeScriptVersion": "2.0"
|
|
145
155
|
}
|