@types/node 8.10.63 → 9.3.0
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.10/LICENSE → node/LICENSE +1 -1
- node/README.md +16 -0
- node v8.10/base.d.ts → node/index.d.ts +345 -552
- node v8.10/inspector.d.ts → node/inspector.d.ts +6 -30
- node v8.10/package.json → node/package.json +24 -60
- node v8.10/README.md +0 -16
- node v8.10/index.d.ts +0 -48
- node v8.10/ts3.1/index.d.ts +0 -41
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Type definitions for Node.js 9.3.x
|
|
2
|
+
// Project: http://nodejs.org/
|
|
3
|
+
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
|
4
|
+
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
|
5
|
+
// Parambir Singh <https://github.com/parambirs>
|
|
6
|
+
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
|
7
|
+
// Wilco Bakker <https://github.com/WilcoBakker>
|
|
8
|
+
// Nicolas Voigt <https://github.com/octo-sniffle>
|
|
9
|
+
// Chigozirim C. <https://github.com/smac89>
|
|
10
|
+
// Flarna <https://github.com/Flarna>
|
|
11
|
+
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
|
12
|
+
// wwwy3y3 <https://github.com/wwwy3y3>
|
|
13
|
+
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
|
14
|
+
// Kelvin Jin <https://github.com/kjin>
|
|
15
|
+
// Alvis HT Tang <https://github.com/alvis>
|
|
16
|
+
// Oliver Joseph Ash <https://github.com/OliverJAsh>
|
|
17
|
+
// Sebastian Silbermann <https://github.com/eps1lon>
|
|
18
|
+
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
|
19
|
+
// Alberto Schiabel <https://github.com/jkomyno>
|
|
20
|
+
// Klaus Meinhardt <https://github.com/ajafff>
|
|
21
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
22
|
+
|
|
2
23
|
/** inspector module types */
|
|
3
24
|
/// <reference path="./inspector.d.ts" />
|
|
4
25
|
|
|
@@ -6,32 +27,15 @@
|
|
|
6
27
|
interface Console {
|
|
7
28
|
Console: NodeJS.ConsoleConstructor;
|
|
8
29
|
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
|
9
|
-
clear(): void;
|
|
10
|
-
count(label?: string): void;
|
|
11
|
-
countReset(label?: string): void;
|
|
12
|
-
debug(message?: any, ...optionalParams: any[]): void;
|
|
13
30
|
dir(obj: any, options?: NodeJS.InspectOptions): void;
|
|
31
|
+
debug(message?: any, ...optionalParams: any[]): void;
|
|
14
32
|
error(message?: any, ...optionalParams: any[]): void;
|
|
15
|
-
group(...label: any[]): void;
|
|
16
|
-
groupCollapsed(): void;
|
|
17
|
-
groupEnd(): void;
|
|
18
33
|
info(message?: any, ...optionalParams: any[]): void;
|
|
19
34
|
log(message?: any, ...optionalParams: any[]): void;
|
|
20
35
|
time(label: string): void;
|
|
21
36
|
timeEnd(label: string): void;
|
|
22
37
|
trace(message?: any, ...optionalParams: any[]): void;
|
|
23
38
|
warn(message?: any, ...optionalParams: any[]): void;
|
|
24
|
-
|
|
25
|
-
// --- Inspector mode only ---
|
|
26
|
-
/** @deprecated Use console.timeStamp() instead. */
|
|
27
|
-
markTimeline(label?: string): void;
|
|
28
|
-
profile(label?: string): void;
|
|
29
|
-
profileEnd(label?: string): void;
|
|
30
|
-
timeStamp(label?: string): void;
|
|
31
|
-
/** @deprecated Use console.time() instead. */
|
|
32
|
-
timeline(label?: string): void;
|
|
33
|
-
/** @deprecated Use console.timeEnd() instead. */
|
|
34
|
-
timelineEnd(label?: string): void;
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
interface Error {
|
|
@@ -53,6 +57,25 @@ interface ErrorConstructor {
|
|
|
53
57
|
stackTraceLimit: number;
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
// compat for TypeScript 1.8
|
|
61
|
+
// if you use with --target es3 or --target es5 and use below definitions,
|
|
62
|
+
// use the lib.es6.d.ts that is bundled with TypeScript 1.8.
|
|
63
|
+
interface MapConstructor { }
|
|
64
|
+
interface WeakMapConstructor { }
|
|
65
|
+
interface SetConstructor { }
|
|
66
|
+
interface WeakSetConstructor { }
|
|
67
|
+
|
|
68
|
+
// Forward-declare needed types from lib.es2015.d.ts (in case users are using `--lib es5`)
|
|
69
|
+
interface Iterable<T> { }
|
|
70
|
+
interface Iterator<T> {
|
|
71
|
+
next(value?: any): IteratorResult<T>;
|
|
72
|
+
}
|
|
73
|
+
interface IteratorResult<T> { }
|
|
74
|
+
interface SymbolConstructor {
|
|
75
|
+
readonly iterator: symbol;
|
|
76
|
+
}
|
|
77
|
+
declare var Symbol: SymbolConstructor;
|
|
78
|
+
|
|
56
79
|
// Node.js ESNEXT support
|
|
57
80
|
interface String {
|
|
58
81
|
/** Removes whitespace from the left end of a string. */
|
|
@@ -90,22 +113,17 @@ declare function clearImmediate(immediateId: any): void;
|
|
|
90
113
|
|
|
91
114
|
// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
|
|
92
115
|
interface NodeRequireFunction {
|
|
93
|
-
|
|
116
|
+
/* tslint:disable-next-line:callable-types */
|
|
94
117
|
(id: string): any;
|
|
95
118
|
}
|
|
96
119
|
|
|
97
120
|
interface NodeRequire extends NodeRequireFunction {
|
|
98
|
-
resolve:
|
|
121
|
+
resolve(id: string): string;
|
|
99
122
|
cache: any;
|
|
100
123
|
extensions: NodeExtensions;
|
|
101
124
|
main: NodeModule | undefined;
|
|
102
125
|
}
|
|
103
126
|
|
|
104
|
-
interface RequireResolve {
|
|
105
|
-
(id: string, options?: { paths?: string[]; }): string;
|
|
106
|
-
paths(request: string): string[] | null;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
127
|
interface NodeExtensions {
|
|
110
128
|
'.js': (m: NodeModule, filename: string) => any;
|
|
111
129
|
'.json': (m: NodeModule, filename: string) => any;
|
|
@@ -191,6 +209,10 @@ declare var Buffer: {
|
|
|
191
209
|
*/
|
|
192
210
|
new(buffer: Buffer): Buffer;
|
|
193
211
|
prototype: Buffer;
|
|
212
|
+
/**
|
|
213
|
+
* Allocates a new Buffer using an {array} of octets.
|
|
214
|
+
*/
|
|
215
|
+
from(array: any[]): Buffer;
|
|
194
216
|
/**
|
|
195
217
|
* When passed a reference to the .buffer property of a TypedArray instance,
|
|
196
218
|
* the newly created Buffer will share the same allocated memory as the TypedArray.
|
|
@@ -201,10 +223,9 @@ declare var Buffer: {
|
|
|
201
223
|
*/
|
|
202
224
|
from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
203
225
|
/**
|
|
204
|
-
*
|
|
205
|
-
* @param data data to create a new Buffer
|
|
226
|
+
* Copies the passed {buffer} data onto a new Buffer instance.
|
|
206
227
|
*/
|
|
207
|
-
from(
|
|
228
|
+
from(buffer: Buffer): Buffer;
|
|
208
229
|
/**
|
|
209
230
|
* Creates a new Buffer containing the given JavaScript string {str}.
|
|
210
231
|
* If provided, the {encoding} parameter identifies the character encoding.
|
|
@@ -431,8 +452,6 @@ declare namespace NodeJS {
|
|
|
431
452
|
remove(emitter: Events): void;
|
|
432
453
|
bind(cb: (err: Error, data: any) => any): any;
|
|
433
454
|
intercept(cb: (data: any) => any): any;
|
|
434
|
-
/** @deprecated since v0.11.7 - recover from failed I/O actions explicitly via error event handlers set on the domain instead. */
|
|
435
|
-
dispose(): void;
|
|
436
455
|
|
|
437
456
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
438
457
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
@@ -445,7 +464,6 @@ declare namespace NodeJS {
|
|
|
445
464
|
rss: number;
|
|
446
465
|
heapTotal: number;
|
|
447
466
|
heapUsed: number;
|
|
448
|
-
external: number;
|
|
449
467
|
}
|
|
450
468
|
|
|
451
469
|
export interface CpuUsage {
|
|
@@ -453,14 +471,6 @@ declare namespace NodeJS {
|
|
|
453
471
|
system: number;
|
|
454
472
|
}
|
|
455
473
|
|
|
456
|
-
export interface ProcessRelease {
|
|
457
|
-
name: string;
|
|
458
|
-
sourceUrl?: string;
|
|
459
|
-
headersUrl?: string;
|
|
460
|
-
libUrl?: string;
|
|
461
|
-
lts?: string;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
474
|
export interface ProcessVersions {
|
|
465
475
|
http_parser: string;
|
|
466
476
|
node: string;
|
|
@@ -493,10 +503,10 @@ declare namespace NodeJS {
|
|
|
493
503
|
type ExitListener = (code: number) => void;
|
|
494
504
|
type RejectionHandledListener = (promise: Promise<any>) => void;
|
|
495
505
|
type UncaughtExceptionListener = (error: Error) => void;
|
|
496
|
-
type UnhandledRejectionListener = (reason:
|
|
506
|
+
type UnhandledRejectionListener = (reason: any, promise: Promise<any>) => void;
|
|
497
507
|
type WarningListener = (warning: Error) => void;
|
|
498
508
|
type MessageListener = (message: any, sendHandle: any) => void;
|
|
499
|
-
type SignalsListener = () => void;
|
|
509
|
+
type SignalsListener = (signal: Signals) => void;
|
|
500
510
|
type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
|
|
501
511
|
type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
|
|
502
512
|
|
|
@@ -513,7 +523,7 @@ declare namespace NodeJS {
|
|
|
513
523
|
columns?: number;
|
|
514
524
|
rows?: number;
|
|
515
525
|
_write(chunk: any, encoding: string, callback: Function): void;
|
|
516
|
-
_destroy(err: Error
|
|
526
|
+
_destroy(err: Error, callback: Function): void;
|
|
517
527
|
_final(callback: Function): void;
|
|
518
528
|
setDefaultEncoding(encoding: string): this;
|
|
519
529
|
cork(): void;
|
|
@@ -525,7 +535,7 @@ declare namespace NodeJS {
|
|
|
525
535
|
isRaw?: boolean;
|
|
526
536
|
setRawMode?(mode: boolean): void;
|
|
527
537
|
_read(size: number): void;
|
|
528
|
-
_destroy(err: Error
|
|
538
|
+
_destroy(err: Error, callback: Function): void;
|
|
529
539
|
push(chunk: any, encoding?: string): boolean;
|
|
530
540
|
destroy(error?: Error): void;
|
|
531
541
|
}
|
|
@@ -542,7 +552,6 @@ declare namespace NodeJS {
|
|
|
542
552
|
abort(): void;
|
|
543
553
|
chdir(directory: string): void;
|
|
544
554
|
cwd(): string;
|
|
545
|
-
debugPort: number;
|
|
546
555
|
emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
|
|
547
556
|
env: ProcessEnv;
|
|
548
557
|
exit(code?: number): never;
|
|
@@ -557,6 +566,8 @@ declare namespace NodeJS {
|
|
|
557
566
|
setegid(id: number | string): void;
|
|
558
567
|
getgroups(): number[];
|
|
559
568
|
setgroups(groups: Array<string | number>): void;
|
|
569
|
+
setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
|
|
570
|
+
hasUncaughtExceptionCaptureCallback(): boolean;
|
|
560
571
|
version: string;
|
|
561
572
|
versions: ProcessVersions;
|
|
562
573
|
config: {
|
|
@@ -587,6 +598,7 @@ declare namespace NodeJS {
|
|
|
587
598
|
};
|
|
588
599
|
kill(pid: number, signal?: string | number): void;
|
|
589
600
|
pid: number;
|
|
601
|
+
ppid: number;
|
|
590
602
|
title: string;
|
|
591
603
|
arch: string;
|
|
592
604
|
platform: Platform;
|
|
@@ -594,7 +606,6 @@ declare namespace NodeJS {
|
|
|
594
606
|
memoryUsage(): MemoryUsage;
|
|
595
607
|
cpuUsage(previousValue?: CpuUsage): CpuUsage;
|
|
596
608
|
nextTick(callback: Function, ...args: any[]): void;
|
|
597
|
-
release: ProcessRelease;
|
|
598
609
|
umask(mask?: number): number;
|
|
599
610
|
uptime(): number;
|
|
600
611
|
hrtime(time?: [number, number]): [number, number];
|
|
@@ -795,6 +806,8 @@ declare namespace NodeJS {
|
|
|
795
806
|
}
|
|
796
807
|
}
|
|
797
808
|
|
|
809
|
+
interface IterableIterator<T> { }
|
|
810
|
+
|
|
798
811
|
/**
|
|
799
812
|
* @deprecated
|
|
800
813
|
*/
|
|
@@ -863,8 +876,6 @@ declare module "buffer" {
|
|
|
863
876
|
export var INSPECT_MAX_BYTES: number;
|
|
864
877
|
var BuffType: typeof Buffer;
|
|
865
878
|
var SlowBuffType: typeof SlowBuffer;
|
|
866
|
-
export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
|
|
867
|
-
export function transcode(source: Buffer | Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
|
|
868
879
|
export { BuffType as Buffer, SlowBuffType as SlowBuffer };
|
|
869
880
|
}
|
|
870
881
|
|
|
@@ -878,7 +889,7 @@ declare module "querystring" {
|
|
|
878
889
|
decodeURIComponent?: Function;
|
|
879
890
|
}
|
|
880
891
|
|
|
881
|
-
interface ParsedUrlQuery { [key: string]: string | string[]
|
|
892
|
+
interface ParsedUrlQuery { [key: string]: string | string[]; }
|
|
882
893
|
|
|
883
894
|
export function stringify<T>(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string;
|
|
884
895
|
export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
|
|
@@ -923,18 +934,17 @@ declare module "http" {
|
|
|
923
934
|
// incoming headers will never contain number
|
|
924
935
|
export interface IncomingHttpHeaders {
|
|
925
936
|
'accept'?: string;
|
|
926
|
-
'accept-patch'?: string;
|
|
927
|
-
'accept-ranges'?: string;
|
|
928
|
-
'access-control-allow-credentials'?: string;
|
|
929
|
-
'access-control-allow-headers'?: string;
|
|
930
|
-
'access-control-allow-methods'?: string;
|
|
931
937
|
'access-control-allow-origin'?: string;
|
|
938
|
+
'access-control-allow-credentials'?: string;
|
|
932
939
|
'access-control-expose-headers'?: string;
|
|
933
940
|
'access-control-max-age'?: string;
|
|
941
|
+
'access-control-allow-methods'?: string;
|
|
942
|
+
'access-control-allow-headers'?: string;
|
|
943
|
+
'accept-patch'?: string;
|
|
944
|
+
'accept-ranges'?: string;
|
|
934
945
|
'age'?: string;
|
|
935
946
|
'allow'?: string;
|
|
936
947
|
'alt-svc'?: string;
|
|
937
|
-
'authorization'?: string;
|
|
938
948
|
'cache-control'?: string;
|
|
939
949
|
'connection'?: string;
|
|
940
950
|
'content-disposition'?: string;
|
|
@@ -955,11 +965,10 @@ declare module "http" {
|
|
|
955
965
|
'retry-after'?: string;
|
|
956
966
|
'set-cookie'?: string[];
|
|
957
967
|
'strict-transport-security'?: string;
|
|
958
|
-
'tk'?: string;
|
|
959
968
|
'trailer'?: string;
|
|
960
969
|
'transfer-encoding'?: string;
|
|
970
|
+
'tk'?: string;
|
|
961
971
|
'upgrade'?: string;
|
|
962
|
-
'user-agent'?: string;
|
|
963
972
|
'vary'?: string;
|
|
964
973
|
'via'?: string;
|
|
965
974
|
'warning'?: string;
|
|
@@ -1057,7 +1066,6 @@ declare module "http" {
|
|
|
1057
1066
|
|
|
1058
1067
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
1059
1068
|
|
|
1060
|
-
readonly path: string;
|
|
1061
1069
|
abort(): void;
|
|
1062
1070
|
onSocket(socket: net.Socket): void;
|
|
1063
1071
|
setTimeout(timeout: number, callback?: () => void): this;
|
|
@@ -1123,7 +1131,6 @@ declare module "http" {
|
|
|
1123
1131
|
}
|
|
1124
1132
|
|
|
1125
1133
|
export class Agent {
|
|
1126
|
-
maxFreeSockets: number;
|
|
1127
1134
|
maxSockets: number;
|
|
1128
1135
|
sockets: any;
|
|
1129
1136
|
requests: any;
|
|
@@ -1183,7 +1190,6 @@ declare module "cluster" {
|
|
|
1183
1190
|
export class Worker extends events.EventEmitter {
|
|
1184
1191
|
id: number;
|
|
1185
1192
|
process: child.ChildProcess;
|
|
1186
|
-
/** @deprecated since v6.0.0 - use `worker.exitedAfterDisconnect` instead. */
|
|
1187
1193
|
suicide: boolean;
|
|
1188
1194
|
send(message: any, sendHandle?: any, callback?: (error: Error) => void): boolean;
|
|
1189
1195
|
kill(signal?: string): void;
|
|
@@ -1460,28 +1466,27 @@ declare module "zlib" {
|
|
|
1460
1466
|
export function createInflateRaw(options?: ZlibOptions): InflateRaw;
|
|
1461
1467
|
export function createUnzip(options?: ZlibOptions): Unzip;
|
|
1462
1468
|
|
|
1463
|
-
|
|
1464
|
-
export function deflate(buf:
|
|
1465
|
-
export function
|
|
1466
|
-
export function
|
|
1467
|
-
export function deflateRaw(buf:
|
|
1468
|
-
export function
|
|
1469
|
-
export function
|
|
1470
|
-
export function gzip(buf:
|
|
1471
|
-
export function
|
|
1472
|
-
export function
|
|
1473
|
-
export function gunzip(buf:
|
|
1474
|
-
export function
|
|
1475
|
-
export function
|
|
1476
|
-
export function inflate(buf:
|
|
1477
|
-
export function
|
|
1478
|
-
export function
|
|
1479
|
-
export function inflateRaw(buf:
|
|
1480
|
-
export function
|
|
1481
|
-
export function
|
|
1482
|
-
export function unzip(buf:
|
|
1483
|
-
export function
|
|
1484
|
-
export function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
1469
|
+
export function deflate(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1470
|
+
export function deflate(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1471
|
+
export function deflateSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
|
|
1472
|
+
export function deflateRaw(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1473
|
+
export function deflateRaw(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1474
|
+
export function deflateRawSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
|
|
1475
|
+
export function gzip(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1476
|
+
export function gzip(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1477
|
+
export function gzipSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
|
|
1478
|
+
export function gunzip(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1479
|
+
export function gunzip(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1480
|
+
export function gunzipSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
|
|
1481
|
+
export function inflate(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1482
|
+
export function inflate(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1483
|
+
export function inflateSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
|
|
1484
|
+
export function inflateRaw(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1485
|
+
export function inflateRaw(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1486
|
+
export function inflateRawSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
|
|
1487
|
+
export function unzip(buf: Buffer | string, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1488
|
+
export function unzip(buf: Buffer | string, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1489
|
+
export function unzipSync(buf: Buffer | string, options?: ZlibOptions): Buffer;
|
|
1485
1490
|
|
|
1486
1491
|
export namespace constants {
|
|
1487
1492
|
// Allowed flush values.
|
|
@@ -1573,7 +1578,6 @@ declare module "os" {
|
|
|
1573
1578
|
netmask: string;
|
|
1574
1579
|
mac: string;
|
|
1575
1580
|
internal: boolean;
|
|
1576
|
-
cidr: string | null;
|
|
1577
1581
|
}
|
|
1578
1582
|
|
|
1579
1583
|
export interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
|
|
@@ -1600,7 +1604,6 @@ declare module "os" {
|
|
|
1600
1604
|
export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string };
|
|
1601
1605
|
export var constants: {
|
|
1602
1606
|
UV_UDP_REUSEADDR: number,
|
|
1603
|
-
// signals: { [key in NodeJS.Signals]: number; }; @todo: change after migration to typescript 2.1
|
|
1604
1607
|
signals: {
|
|
1605
1608
|
SIGHUP: number;
|
|
1606
1609
|
SIGINT: number;
|
|
@@ -1623,7 +1626,6 @@ declare module "os" {
|
|
|
1623
1626
|
SIGCONT: number;
|
|
1624
1627
|
SIGSTOP: number;
|
|
1625
1628
|
SIGTSTP: number;
|
|
1626
|
-
SIGBREAK: number;
|
|
1627
1629
|
SIGTTIN: number;
|
|
1628
1630
|
SIGTTOU: number;
|
|
1629
1631
|
SIGURG: number;
|
|
@@ -1634,9 +1636,7 @@ declare module "os" {
|
|
|
1634
1636
|
SIGWINCH: number;
|
|
1635
1637
|
SIGIO: number;
|
|
1636
1638
|
SIGPOLL: number;
|
|
1637
|
-
SIGLOST: number;
|
|
1638
1639
|
SIGPWR: number;
|
|
1639
|
-
SIGINFO: number;
|
|
1640
1640
|
SIGSYS: number;
|
|
1641
1641
|
SIGUNUSED: number;
|
|
1642
1642
|
},
|
|
@@ -1735,20 +1735,33 @@ declare module "https" {
|
|
|
1735
1735
|
import * as http from "http";
|
|
1736
1736
|
import { URL } from "url";
|
|
1737
1737
|
|
|
1738
|
-
export
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1738
|
+
export interface ServerOptions {
|
|
1739
|
+
pfx?: any;
|
|
1740
|
+
key?: any;
|
|
1741
|
+
passphrase?: string;
|
|
1742
|
+
cert?: any;
|
|
1743
|
+
ca?: any;
|
|
1744
|
+
crl?: any;
|
|
1745
|
+
ciphers?: string;
|
|
1746
|
+
honorCipherOrder?: boolean;
|
|
1747
|
+
requestCert?: boolean;
|
|
1748
|
+
rejectUnauthorized?: boolean;
|
|
1749
|
+
NPNProtocols?: any;
|
|
1750
|
+
SNICallback?: (servername: string, cb: (err: Error | null, ctx: tls.SecureContext) => void) => void;
|
|
1751
|
+
secureProtocol?: string;
|
|
1752
|
+
}
|
|
1750
1753
|
|
|
1751
|
-
export
|
|
1754
|
+
export interface RequestOptions extends http.RequestOptions {
|
|
1755
|
+
pfx?: any;
|
|
1756
|
+
key?: any;
|
|
1757
|
+
passphrase?: string;
|
|
1758
|
+
cert?: any;
|
|
1759
|
+
ca?: any;
|
|
1760
|
+
ciphers?: string;
|
|
1761
|
+
rejectUnauthorized?: boolean;
|
|
1762
|
+
secureProtocol?: string;
|
|
1763
|
+
servername?: string;
|
|
1764
|
+
}
|
|
1752
1765
|
|
|
1753
1766
|
export interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
|
|
1754
1767
|
rejectUnauthorized?: boolean;
|
|
@@ -1757,7 +1770,6 @@ declare module "https" {
|
|
|
1757
1770
|
|
|
1758
1771
|
export class Agent extends http.Agent {
|
|
1759
1772
|
constructor(options?: AgentOptions);
|
|
1760
|
-
options: AgentOptions;
|
|
1761
1773
|
}
|
|
1762
1774
|
|
|
1763
1775
|
export class Server extends tls.Server {
|
|
@@ -1951,9 +1963,6 @@ declare module "readline" {
|
|
|
1951
1963
|
completer?: Completer | AsyncCompleter;
|
|
1952
1964
|
terminal?: boolean;
|
|
1953
1965
|
historySize?: number;
|
|
1954
|
-
prompt?: string;
|
|
1955
|
-
crlfDelay?: number;
|
|
1956
|
-
removeHistoryDuplicates?: boolean;
|
|
1957
1966
|
}
|
|
1958
1967
|
|
|
1959
1968
|
export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine;
|
|
@@ -1992,26 +2001,24 @@ declare module "vm" {
|
|
|
1992
2001
|
}
|
|
1993
2002
|
export function createContext(sandbox?: Context): Context;
|
|
1994
2003
|
export function isContext(sandbox: Context): boolean;
|
|
1995
|
-
export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions
|
|
2004
|
+
export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any;
|
|
1996
2005
|
export function runInDebugContext(code: string): any;
|
|
1997
|
-
export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions
|
|
1998
|
-
export function runInThisContext(code: string, options?: RunningScriptOptions
|
|
2006
|
+
export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any;
|
|
2007
|
+
export function runInThisContext(code: string, options?: RunningScriptOptions): any;
|
|
1999
2008
|
}
|
|
2000
2009
|
|
|
2001
2010
|
declare module "child_process" {
|
|
2002
2011
|
import * as events from "events";
|
|
2003
2012
|
import * as stream from "stream";
|
|
2004
2013
|
import * as net from "net";
|
|
2014
|
+
|
|
2005
2015
|
export interface ChildProcess extends events.EventEmitter {
|
|
2006
2016
|
stdin: stream.Writable;
|
|
2007
2017
|
stdout: stream.Readable;
|
|
2008
2018
|
stderr: stream.Readable;
|
|
2009
|
-
|
|
2010
|
-
stdio: StdioStreams;
|
|
2019
|
+
stdio: [stream.Writable, stream.Readable, stream.Readable];
|
|
2011
2020
|
killed: boolean;
|
|
2012
2021
|
pid: number;
|
|
2013
|
-
readonly exitCode: number | null;
|
|
2014
|
-
readonly signalCode: number | null;
|
|
2015
2022
|
kill(signal?: string): void;
|
|
2016
2023
|
send(message: any, callback?: (error: Error) => void): boolean;
|
|
2017
2024
|
send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error) => void): boolean;
|
|
@@ -2073,12 +2080,6 @@ declare module "child_process" {
|
|
|
2073
2080
|
prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
|
|
2074
2081
|
}
|
|
2075
2082
|
|
|
2076
|
-
export interface StdioStreams extends ReadonlyArray<stream.Readable|stream.Writable> {
|
|
2077
|
-
0: stream.Writable; // stdin
|
|
2078
|
-
1: stream.Readable; // stdout
|
|
2079
|
-
2: stream.Readable; // stderr
|
|
2080
|
-
}
|
|
2081
|
-
|
|
2082
2083
|
export interface MessageOptions {
|
|
2083
2084
|
keepOpen?: boolean;
|
|
2084
2085
|
}
|
|
@@ -2092,10 +2093,9 @@ declare module "child_process" {
|
|
|
2092
2093
|
gid?: number;
|
|
2093
2094
|
shell?: boolean | string;
|
|
2094
2095
|
windowsVerbatimArguments?: boolean;
|
|
2095
|
-
windowsHide?: boolean;
|
|
2096
2096
|
}
|
|
2097
2097
|
|
|
2098
|
-
export function spawn(command: string, args?:
|
|
2098
|
+
export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess;
|
|
2099
2099
|
|
|
2100
2100
|
export interface ExecOptions {
|
|
2101
2101
|
cwd?: string;
|
|
@@ -2106,7 +2106,6 @@ declare module "child_process" {
|
|
|
2106
2106
|
killSignal?: string;
|
|
2107
2107
|
uid?: number;
|
|
2108
2108
|
gid?: number;
|
|
2109
|
-
windowsHide?: boolean;
|
|
2110
2109
|
}
|
|
2111
2110
|
|
|
2112
2111
|
export interface ExecOptionsWithStringEncoding extends ExecOptions {
|
|
@@ -2153,9 +2152,7 @@ declare module "child_process" {
|
|
|
2153
2152
|
killSignal?: string;
|
|
2154
2153
|
uid?: number;
|
|
2155
2154
|
gid?: number;
|
|
2156
|
-
windowsHide?: boolean;
|
|
2157
2155
|
windowsVerbatimArguments?: boolean;
|
|
2158
|
-
shell?: boolean | string;
|
|
2159
2156
|
}
|
|
2160
2157
|
export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
|
|
2161
2158
|
encoding: BufferEncoding;
|
|
@@ -2220,12 +2217,10 @@ declare module "child_process" {
|
|
|
2220
2217
|
execArgv?: string[];
|
|
2221
2218
|
silent?: boolean;
|
|
2222
2219
|
stdio?: any[];
|
|
2223
|
-
detached?: boolean;
|
|
2224
2220
|
uid?: number;
|
|
2225
2221
|
gid?: number;
|
|
2226
2222
|
windowsVerbatimArguments?: boolean;
|
|
2227
2223
|
}
|
|
2228
|
-
export function fork(modulePath: string, options?: ForkOptions): ChildProcess;
|
|
2229
2224
|
export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess;
|
|
2230
2225
|
|
|
2231
2226
|
export interface SpawnSyncOptions {
|
|
@@ -2240,7 +2235,6 @@ declare module "child_process" {
|
|
|
2240
2235
|
maxBuffer?: number;
|
|
2241
2236
|
encoding?: string;
|
|
2242
2237
|
shell?: boolean | string;
|
|
2243
|
-
windowsHide?: boolean;
|
|
2244
2238
|
windowsVerbatimArguments?: boolean;
|
|
2245
2239
|
}
|
|
2246
2240
|
export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
|
|
@@ -2256,7 +2250,7 @@ declare module "child_process" {
|
|
|
2256
2250
|
stderr: T;
|
|
2257
2251
|
status: number;
|
|
2258
2252
|
signal: string;
|
|
2259
|
-
error
|
|
2253
|
+
error: Error;
|
|
2260
2254
|
}
|
|
2261
2255
|
export function spawnSync(command: string): SpawnSyncReturns<Buffer>;
|
|
2262
2256
|
export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
@@ -2278,7 +2272,6 @@ declare module "child_process" {
|
|
|
2278
2272
|
killSignal?: string;
|
|
2279
2273
|
maxBuffer?: number;
|
|
2280
2274
|
encoding?: string;
|
|
2281
|
-
windowsHide?: boolean;
|
|
2282
2275
|
}
|
|
2283
2276
|
export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
|
|
2284
2277
|
encoding: BufferEncoding;
|
|
@@ -2302,7 +2295,6 @@ declare module "child_process" {
|
|
|
2302
2295
|
killSignal?: string;
|
|
2303
2296
|
maxBuffer?: number;
|
|
2304
2297
|
encoding?: string;
|
|
2305
|
-
windowsHide?: boolean;
|
|
2306
2298
|
}
|
|
2307
2299
|
export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
|
|
2308
2300
|
encoding: BufferEncoding;
|
|
@@ -2364,9 +2356,6 @@ declare module "url" {
|
|
|
2364
2356
|
export function format(urlObject: UrlObject | string): string;
|
|
2365
2357
|
export function resolve(from: string, to: string): string;
|
|
2366
2358
|
|
|
2367
|
-
export function domainToASCII(domain: string): string;
|
|
2368
|
-
export function domainToUnicode(domain: string): string;
|
|
2369
|
-
|
|
2370
2359
|
export interface URLFormatOptions {
|
|
2371
2360
|
auth?: boolean;
|
|
2372
2361
|
fragment?: boolean;
|
|
@@ -2379,7 +2368,7 @@ declare module "url" {
|
|
|
2379
2368
|
append(name: string, value: string): void;
|
|
2380
2369
|
delete(name: string): void;
|
|
2381
2370
|
entries(): IterableIterator<[string, string]>;
|
|
2382
|
-
forEach(callback: (value: string, name: string
|
|
2371
|
+
forEach(callback: (value: string, name: string) => void): void;
|
|
2383
2372
|
get(name: string): string | null;
|
|
2384
2373
|
getAll(name: string): string[];
|
|
2385
2374
|
has(name: string): boolean;
|
|
@@ -2419,7 +2408,6 @@ declare module "dns" {
|
|
|
2419
2408
|
family?: number;
|
|
2420
2409
|
hints?: number;
|
|
2421
2410
|
all?: boolean;
|
|
2422
|
-
verbatim?: boolean;
|
|
2423
2411
|
}
|
|
2424
2412
|
|
|
2425
2413
|
export interface LookupOneOptions extends LookupOptions {
|
|
@@ -2435,11 +2423,11 @@ declare module "dns" {
|
|
|
2435
2423
|
family: number;
|
|
2436
2424
|
}
|
|
2437
2425
|
|
|
2438
|
-
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException
|
|
2439
|
-
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException
|
|
2440
|
-
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException
|
|
2441
|
-
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException
|
|
2442
|
-
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException
|
|
2426
|
+
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2427
|
+
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2428
|
+
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
|
2429
|
+
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
|
2430
|
+
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2443
2431
|
|
|
2444
2432
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2445
2433
|
export namespace lookup {
|
|
@@ -2448,12 +2436,6 @@ declare module "dns" {
|
|
|
2448
2436
|
export function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>;
|
|
2449
2437
|
}
|
|
2450
2438
|
|
|
2451
|
-
export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
|
|
2452
|
-
|
|
2453
|
-
export namespace lookupService {
|
|
2454
|
-
export function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
2439
|
export interface ResolveOptions {
|
|
2458
2440
|
ttl: boolean;
|
|
2459
2441
|
}
|
|
@@ -2467,23 +2449,11 @@ declare module "dns" {
|
|
|
2467
2449
|
ttl: number;
|
|
2468
2450
|
}
|
|
2469
2451
|
|
|
2470
|
-
export interface AnyARecord extends RecordWithTtl {
|
|
2471
|
-
type: "A";
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
export interface AnyAaaaRecord extends RecordWithTtl {
|
|
2475
|
-
type: "AAAA";
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
2452
|
export interface MxRecord {
|
|
2479
2453
|
priority: number;
|
|
2480
2454
|
exchange: string;
|
|
2481
2455
|
}
|
|
2482
2456
|
|
|
2483
|
-
export interface AnyMxRecord extends MxRecord {
|
|
2484
|
-
type: "MX";
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
2457
|
export interface NaptrRecord {
|
|
2488
2458
|
flags: string;
|
|
2489
2459
|
service: string;
|
|
@@ -2493,10 +2463,6 @@ declare module "dns" {
|
|
|
2493
2463
|
preference: number;
|
|
2494
2464
|
}
|
|
2495
2465
|
|
|
2496
|
-
export interface AnyNaptrRecord extends NaptrRecord {
|
|
2497
|
-
type: "NAPTR";
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
2466
|
export interface SoaRecord {
|
|
2501
2467
|
nsname: string;
|
|
2502
2468
|
hostmaster: string;
|
|
@@ -2507,10 +2473,6 @@ declare module "dns" {
|
|
|
2507
2473
|
minttl: number;
|
|
2508
2474
|
}
|
|
2509
2475
|
|
|
2510
|
-
export interface AnySoaRecord extends SoaRecord {
|
|
2511
|
-
type: "SOA";
|
|
2512
|
-
}
|
|
2513
|
-
|
|
2514
2476
|
export interface SrvRecord {
|
|
2515
2477
|
priority: number;
|
|
2516
2478
|
weight: number;
|
|
@@ -2518,70 +2480,33 @@ declare module "dns" {
|
|
|
2518
2480
|
name: string;
|
|
2519
2481
|
}
|
|
2520
2482
|
|
|
2521
|
-
export
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
export
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
export
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
export interface AnyPtrRecord {
|
|
2536
|
-
type: "PTR";
|
|
2537
|
-
value: string;
|
|
2538
|
-
}
|
|
2539
|
-
|
|
2540
|
-
export interface AnyCnameRecord {
|
|
2541
|
-
type: "CNAME";
|
|
2542
|
-
value: string;
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
export type AnyRecord = AnyARecord |
|
|
2546
|
-
AnyAaaaRecord |
|
|
2547
|
-
AnyCnameRecord |
|
|
2548
|
-
AnyMxRecord |
|
|
2549
|
-
AnyNaptrRecord |
|
|
2550
|
-
AnyNsRecord |
|
|
2551
|
-
AnyPtrRecord |
|
|
2552
|
-
AnySoaRecord |
|
|
2553
|
-
AnySrvRecord |
|
|
2554
|
-
AnyTxtRecord;
|
|
2555
|
-
|
|
2556
|
-
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2557
|
-
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2558
|
-
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2559
|
-
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
|
|
2560
|
-
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2561
|
-
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
|
|
2562
|
-
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
|
|
2563
|
-
export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2564
|
-
export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2565
|
-
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
|
|
2566
|
-
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
|
|
2567
|
-
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
|
|
2568
|
-
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void): void;
|
|
2483
|
+
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2484
|
+
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2485
|
+
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2486
|
+
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2487
|
+
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2488
|
+
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
2489
|
+
export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2490
|
+
export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2491
|
+
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
|
2492
|
+
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2493
|
+
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2494
|
+
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
|
2569
2495
|
|
|
2570
2496
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2571
2497
|
export namespace resolve {
|
|
2572
2498
|
export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
2573
|
-
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
2574
2499
|
export function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
2575
2500
|
export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
2576
2501
|
export function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
2577
2502
|
export function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
2578
2503
|
export function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
2579
|
-
export function __promisify__(hostname: string, rrtype
|
|
2504
|
+
export function __promisify__(hostname: string, rrtype?: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]>;
|
|
2580
2505
|
}
|
|
2581
2506
|
|
|
2582
|
-
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException
|
|
2583
|
-
export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException
|
|
2584
|
-
export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException
|
|
2507
|
+
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2508
|
+
export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
2509
|
+
export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2585
2510
|
|
|
2586
2511
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2587
2512
|
export namespace resolve4 {
|
|
@@ -2590,9 +2515,9 @@ declare module "dns" {
|
|
|
2590
2515
|
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
2591
2516
|
}
|
|
2592
2517
|
|
|
2593
|
-
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException
|
|
2594
|
-
export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException
|
|
2595
|
-
export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException
|
|
2518
|
+
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2519
|
+
export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
2520
|
+
export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2596
2521
|
|
|
2597
2522
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2598
2523
|
export namespace resolve6 {
|
|
@@ -2601,54 +2526,17 @@ declare module "dns" {
|
|
|
2601
2526
|
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
2602
2527
|
}
|
|
2603
2528
|
|
|
2604
|
-
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException
|
|
2605
|
-
export
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
export function
|
|
2610
|
-
export
|
|
2611
|
-
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
|
|
2615
|
-
export namespace resolveNaptr {
|
|
2616
|
-
export function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2619
|
-
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2620
|
-
export namespace resolveNs {
|
|
2621
|
-
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2622
|
-
}
|
|
2623
|
-
|
|
2624
|
-
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2625
|
-
export namespace resolvePtr {
|
|
2626
|
-
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2627
|
-
}
|
|
2628
|
-
|
|
2629
|
-
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
|
|
2630
|
-
export namespace resolveSoa {
|
|
2631
|
-
export function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
|
-
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
|
|
2635
|
-
export namespace resolveSrv {
|
|
2636
|
-
export function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
2637
|
-
}
|
|
2638
|
-
|
|
2639
|
-
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
|
|
2640
|
-
export namespace resolveTxt {
|
|
2641
|
-
export function __promisify__(hostname: string): Promise<string[][]>;
|
|
2642
|
-
}
|
|
2643
|
-
|
|
2644
|
-
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
|
|
2645
|
-
export namespace resolveAny {
|
|
2646
|
-
export function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
|
2647
|
-
}
|
|
2529
|
+
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2530
|
+
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2531
|
+
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
2532
|
+
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2533
|
+
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2534
|
+
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
|
2535
|
+
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2536
|
+
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2648
2537
|
|
|
2649
|
-
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException
|
|
2538
|
+
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
|
2650
2539
|
export function setServers(servers: string[]): void;
|
|
2651
|
-
export function getServers(): string[];
|
|
2652
2540
|
|
|
2653
2541
|
// Error codes
|
|
2654
2542
|
export var NODATA: string;
|
|
@@ -2675,25 +2563,6 @@ declare module "dns" {
|
|
|
2675
2563
|
export var LOADIPHLPAPI: string;
|
|
2676
2564
|
export var ADDRGETNETWORKPARAMS: string;
|
|
2677
2565
|
export var CANCELLED: string;
|
|
2678
|
-
|
|
2679
|
-
export class Resolver {
|
|
2680
|
-
getServers: typeof getServers;
|
|
2681
|
-
setServers: typeof setServers;
|
|
2682
|
-
resolve: typeof resolve;
|
|
2683
|
-
resolve4: typeof resolve4;
|
|
2684
|
-
resolve6: typeof resolve6;
|
|
2685
|
-
resolveAny: typeof resolveAny;
|
|
2686
|
-
resolveCname: typeof resolveCname;
|
|
2687
|
-
resolveMx: typeof resolveMx;
|
|
2688
|
-
resolveNaptr: typeof resolveNaptr;
|
|
2689
|
-
resolveNs: typeof resolveNs;
|
|
2690
|
-
resolvePtr: typeof resolvePtr;
|
|
2691
|
-
resolveSoa: typeof resolveSoa;
|
|
2692
|
-
resolveSrv: typeof resolveSrv;
|
|
2693
|
-
resolveTxt: typeof resolveTxt;
|
|
2694
|
-
reverse: typeof reverse;
|
|
2695
|
-
cancel(): void;
|
|
2696
|
-
}
|
|
2697
2566
|
}
|
|
2698
2567
|
|
|
2699
2568
|
declare module "net" {
|
|
@@ -2747,9 +2616,9 @@ declare module "net" {
|
|
|
2747
2616
|
destroy(err?: any): void;
|
|
2748
2617
|
pause(): this;
|
|
2749
2618
|
resume(): this;
|
|
2750
|
-
setTimeout(timeout: number, callback?: Function):
|
|
2751
|
-
setNoDelay(noDelay?: boolean):
|
|
2752
|
-
setKeepAlive(enable?: boolean, initialDelay?: number):
|
|
2619
|
+
setTimeout(timeout: number, callback?: Function): void;
|
|
2620
|
+
setNoDelay(noDelay?: boolean): void;
|
|
2621
|
+
setKeepAlive(enable?: boolean, initialDelay?: number): void;
|
|
2753
2622
|
address(): { port: number; family: string; address: string; };
|
|
2754
2623
|
unref(): void;
|
|
2755
2624
|
ref(): void;
|
|
@@ -2865,7 +2734,7 @@ declare module "net" {
|
|
|
2865
2734
|
listen(options: ListenOptions, listeningListener?: Function): this;
|
|
2866
2735
|
listen(handle: any, backlog?: number, listeningListener?: Function): this;
|
|
2867
2736
|
listen(handle: any, listeningListener?: Function): this;
|
|
2868
|
-
close(callback?:
|
|
2737
|
+
close(callback?: Function): this;
|
|
2869
2738
|
address(): { port: number; family: string; address: string; };
|
|
2870
2739
|
getConnections(cb: (error: Error | null, count: number) => void): void;
|
|
2871
2740
|
ref(): this;
|
|
@@ -2970,15 +2839,15 @@ declare module "dgram" {
|
|
|
2970
2839
|
reuseAddr?: boolean;
|
|
2971
2840
|
recvBufferSize?: number;
|
|
2972
2841
|
sendBufferSize?: number;
|
|
2973
|
-
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException
|
|
2842
|
+
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void) => void;
|
|
2974
2843
|
}
|
|
2975
2844
|
|
|
2976
2845
|
export function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
|
2977
2846
|
export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
|
2978
2847
|
|
|
2979
2848
|
export class Socket extends events.EventEmitter {
|
|
2980
|
-
send(msg: Buffer |
|
|
2981
|
-
send(msg: Buffer |
|
|
2849
|
+
send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
2850
|
+
send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
2982
2851
|
bind(port?: number, address?: string, callback?: () => void): void;
|
|
2983
2852
|
bind(port?: number, callback?: () => void): void;
|
|
2984
2853
|
bind(callback?: () => void): void;
|
|
@@ -3181,7 +3050,7 @@ declare module "fs" {
|
|
|
3181
3050
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3182
3051
|
* URL support is _experimental_.
|
|
3183
3052
|
*/
|
|
3184
|
-
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3053
|
+
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3185
3054
|
|
|
3186
3055
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3187
3056
|
export namespace rename {
|
|
@@ -3209,14 +3078,14 @@ declare module "fs" {
|
|
|
3209
3078
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3210
3079
|
* @param len If not specified, defaults to `0`.
|
|
3211
3080
|
*/
|
|
3212
|
-
export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3081
|
+
export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3213
3082
|
|
|
3214
3083
|
/**
|
|
3215
3084
|
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
3216
3085
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3217
3086
|
* URL support is _experimental_.
|
|
3218
3087
|
*/
|
|
3219
|
-
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3088
|
+
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3220
3089
|
|
|
3221
3090
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3222
3091
|
export namespace truncate {
|
|
@@ -3240,13 +3109,13 @@ declare module "fs" {
|
|
|
3240
3109
|
* @param fd A file descriptor.
|
|
3241
3110
|
* @param len If not specified, defaults to `0`.
|
|
3242
3111
|
*/
|
|
3243
|
-
export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3112
|
+
export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3244
3113
|
|
|
3245
3114
|
/**
|
|
3246
3115
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
3247
3116
|
* @param fd A file descriptor.
|
|
3248
3117
|
*/
|
|
3249
|
-
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3118
|
+
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3250
3119
|
|
|
3251
3120
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3252
3121
|
export namespace ftruncate {
|
|
@@ -3269,7 +3138,7 @@ declare module "fs" {
|
|
|
3269
3138
|
* Asynchronous chown(2) - Change ownership of a file.
|
|
3270
3139
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3271
3140
|
*/
|
|
3272
|
-
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException
|
|
3141
|
+
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3273
3142
|
|
|
3274
3143
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3275
3144
|
export namespace chown {
|
|
@@ -3290,7 +3159,7 @@ declare module "fs" {
|
|
|
3290
3159
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
3291
3160
|
* @param fd A file descriptor.
|
|
3292
3161
|
*/
|
|
3293
|
-
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException
|
|
3162
|
+
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3294
3163
|
|
|
3295
3164
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3296
3165
|
export namespace fchown {
|
|
@@ -3311,7 +3180,7 @@ declare module "fs" {
|
|
|
3311
3180
|
* Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
|
|
3312
3181
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3313
3182
|
*/
|
|
3314
|
-
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException
|
|
3183
|
+
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3315
3184
|
|
|
3316
3185
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3317
3186
|
export namespace lchown {
|
|
@@ -3333,7 +3202,7 @@ declare module "fs" {
|
|
|
3333
3202
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3334
3203
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3335
3204
|
*/
|
|
3336
|
-
export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException
|
|
3205
|
+
export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3337
3206
|
|
|
3338
3207
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3339
3208
|
export namespace chmod {
|
|
@@ -3357,7 +3226,7 @@ declare module "fs" {
|
|
|
3357
3226
|
* @param fd A file descriptor.
|
|
3358
3227
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3359
3228
|
*/
|
|
3360
|
-
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException
|
|
3229
|
+
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3361
3230
|
|
|
3362
3231
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3363
3232
|
export namespace fchmod {
|
|
@@ -3381,7 +3250,7 @@ declare module "fs" {
|
|
|
3381
3250
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3382
3251
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3383
3252
|
*/
|
|
3384
|
-
export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException
|
|
3253
|
+
export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3385
3254
|
|
|
3386
3255
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3387
3256
|
export namespace lchmod {
|
|
@@ -3404,7 +3273,7 @@ declare module "fs" {
|
|
|
3404
3273
|
* Asynchronous stat(2) - Get file status.
|
|
3405
3274
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3406
3275
|
*/
|
|
3407
|
-
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3276
|
+
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3408
3277
|
|
|
3409
3278
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3410
3279
|
export namespace stat {
|
|
@@ -3425,7 +3294,7 @@ declare module "fs" {
|
|
|
3425
3294
|
* Asynchronous fstat(2) - Get file status.
|
|
3426
3295
|
* @param fd A file descriptor.
|
|
3427
3296
|
*/
|
|
3428
|
-
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3297
|
+
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3429
3298
|
|
|
3430
3299
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3431
3300
|
export namespace fstat {
|
|
@@ -3446,7 +3315,7 @@ declare module "fs" {
|
|
|
3446
3315
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
3447
3316
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3448
3317
|
*/
|
|
3449
|
-
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3318
|
+
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3450
3319
|
|
|
3451
3320
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3452
3321
|
export namespace lstat {
|
|
@@ -3468,7 +3337,7 @@ declare module "fs" {
|
|
|
3468
3337
|
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3469
3338
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3470
3339
|
*/
|
|
3471
|
-
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3340
|
+
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3472
3341
|
|
|
3473
3342
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3474
3343
|
export namespace link {
|
|
@@ -3477,7 +3346,7 @@ declare module "fs" {
|
|
|
3477
3346
|
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3478
3347
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3479
3348
|
*/
|
|
3480
|
-
export function
|
|
3349
|
+
export function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
|
3481
3350
|
}
|
|
3482
3351
|
|
|
3483
3352
|
/**
|
|
@@ -3494,14 +3363,14 @@ declare module "fs" {
|
|
|
3494
3363
|
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
|
3495
3364
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
3496
3365
|
*/
|
|
3497
|
-
export function symlink(target: PathLike, path: PathLike, type:
|
|
3366
|
+
export function symlink(target: PathLike, path: PathLike, type: string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3498
3367
|
|
|
3499
3368
|
/**
|
|
3500
3369
|
* Asynchronous symlink(2) - Create a new symbolic link to an existing file.
|
|
3501
3370
|
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
3502
3371
|
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
|
3503
3372
|
*/
|
|
3504
|
-
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3373
|
+
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3505
3374
|
|
|
3506
3375
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3507
3376
|
export namespace symlink {
|
|
@@ -3513,8 +3382,6 @@ declare module "fs" {
|
|
|
3513
3382
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
3514
3383
|
*/
|
|
3515
3384
|
export function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
|
|
3516
|
-
|
|
3517
|
-
export type Type = "dir" | "file" | "junction";
|
|
3518
3385
|
}
|
|
3519
3386
|
|
|
3520
3387
|
/**
|
|
@@ -3524,34 +3391,34 @@ declare module "fs" {
|
|
|
3524
3391
|
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
|
3525
3392
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
3526
3393
|
*/
|
|
3527
|
-
export function symlinkSync(target: PathLike, path: PathLike, type?:
|
|
3394
|
+
export function symlinkSync(target: PathLike, path: PathLike, type?: string | null): void;
|
|
3528
3395
|
|
|
3529
3396
|
/**
|
|
3530
3397
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3531
3398
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3532
3399
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3533
3400
|
*/
|
|
3534
|
-
export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3401
|
+
export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
|
|
3535
3402
|
|
|
3536
3403
|
/**
|
|
3537
3404
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3538
3405
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3539
3406
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3540
3407
|
*/
|
|
3541
|
-
export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException
|
|
3408
|
+
export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, linkString: Buffer) => void): void;
|
|
3542
3409
|
|
|
3543
3410
|
/**
|
|
3544
3411
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3545
3412
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3546
3413
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3547
3414
|
*/
|
|
3548
|
-
export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3415
|
+
export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string | Buffer) => void): void;
|
|
3549
3416
|
|
|
3550
3417
|
/**
|
|
3551
3418
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3552
3419
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3553
3420
|
*/
|
|
3554
|
-
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3421
|
+
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
|
|
3555
3422
|
|
|
3556
3423
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3557
3424
|
export namespace readlink {
|
|
@@ -3603,27 +3470,27 @@ declare module "fs" {
|
|
|
3603
3470
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3604
3471
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3605
3472
|
*/
|
|
3606
|
-
export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3473
|
+
export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3607
3474
|
|
|
3608
3475
|
/**
|
|
3609
3476
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3610
3477
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3611
3478
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3612
3479
|
*/
|
|
3613
|
-
export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException
|
|
3480
|
+
export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void;
|
|
3614
3481
|
|
|
3615
3482
|
/**
|
|
3616
3483
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3617
3484
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3618
3485
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3619
3486
|
*/
|
|
3620
|
-
export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3487
|
+
export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void;
|
|
3621
3488
|
|
|
3622
3489
|
/**
|
|
3623
3490
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3624
3491
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3625
3492
|
*/
|
|
3626
|
-
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3493
|
+
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3627
3494
|
|
|
3628
3495
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3629
3496
|
export namespace realpath {
|
|
@@ -3647,6 +3514,11 @@ declare module "fs" {
|
|
|
3647
3514
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3648
3515
|
*/
|
|
3649
3516
|
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
|
|
3517
|
+
|
|
3518
|
+
export function native(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3519
|
+
export function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void;
|
|
3520
|
+
export function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void;
|
|
3521
|
+
export function native(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3650
3522
|
}
|
|
3651
3523
|
|
|
3652
3524
|
/**
|
|
@@ -3670,11 +3542,17 @@ declare module "fs" {
|
|
|
3670
3542
|
*/
|
|
3671
3543
|
export function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer;
|
|
3672
3544
|
|
|
3545
|
+
export namespace realpathSync {
|
|
3546
|
+
export function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string;
|
|
3547
|
+
export function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer;
|
|
3548
|
+
export function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer;
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3673
3551
|
/**
|
|
3674
3552
|
* Asynchronous unlink(2) - delete a name and possibly the file it refers to.
|
|
3675
3553
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3676
3554
|
*/
|
|
3677
|
-
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3555
|
+
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3678
3556
|
|
|
3679
3557
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3680
3558
|
export namespace unlink {
|
|
@@ -3695,7 +3573,7 @@ declare module "fs" {
|
|
|
3695
3573
|
* Asynchronous rmdir(2) - delete a directory.
|
|
3696
3574
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3697
3575
|
*/
|
|
3698
|
-
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3576
|
+
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3699
3577
|
|
|
3700
3578
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3701
3579
|
export namespace rmdir {
|
|
@@ -3717,13 +3595,13 @@ declare module "fs" {
|
|
|
3717
3595
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3718
3596
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
3719
3597
|
*/
|
|
3720
|
-
export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3598
|
+
export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3721
3599
|
|
|
3722
3600
|
/**
|
|
3723
3601
|
* Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
|
|
3724
3602
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3725
3603
|
*/
|
|
3726
|
-
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3604
|
+
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3727
3605
|
|
|
3728
3606
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3729
3607
|
export namespace mkdir {
|
|
@@ -3747,27 +3625,27 @@ declare module "fs" {
|
|
|
3747
3625
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3748
3626
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3749
3627
|
*/
|
|
3750
|
-
export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3628
|
+
export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
3751
3629
|
|
|
3752
3630
|
/**
|
|
3753
3631
|
* Asynchronously creates a unique temporary directory.
|
|
3754
3632
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3755
3633
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3756
3634
|
*/
|
|
3757
|
-
export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException
|
|
3635
|
+
export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException, folder: Buffer) => void): void;
|
|
3758
3636
|
|
|
3759
3637
|
/**
|
|
3760
3638
|
* Asynchronously creates a unique temporary directory.
|
|
3761
3639
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3762
3640
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3763
3641
|
*/
|
|
3764
|
-
export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3642
|
+
export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string | Buffer) => void): void;
|
|
3765
3643
|
|
|
3766
3644
|
/**
|
|
3767
3645
|
* Asynchronously creates a unique temporary directory.
|
|
3768
3646
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3769
3647
|
*/
|
|
3770
|
-
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException
|
|
3648
|
+
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
3771
3649
|
|
|
3772
3650
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3773
3651
|
export namespace mkdtemp {
|
|
@@ -3819,27 +3697,27 @@ declare module "fs" {
|
|
|
3819
3697
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3820
3698
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3821
3699
|
*/
|
|
3822
|
-
export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3700
|
+
export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
3823
3701
|
|
|
3824
3702
|
/**
|
|
3825
3703
|
* Asynchronous readdir(3) - read a directory.
|
|
3826
3704
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3827
3705
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3828
3706
|
*/
|
|
3829
|
-
export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException
|
|
3707
|
+
export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, files: Buffer[]) => void): void;
|
|
3830
3708
|
|
|
3831
3709
|
/**
|
|
3832
3710
|
* Asynchronous readdir(3) - read a directory.
|
|
3833
3711
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3834
3712
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3835
3713
|
*/
|
|
3836
|
-
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3714
|
+
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: Array<string | Buffer>) => void): void;
|
|
3837
3715
|
|
|
3838
3716
|
/**
|
|
3839
3717
|
* Asynchronous readdir(3) - read a directory.
|
|
3840
3718
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3841
3719
|
*/
|
|
3842
|
-
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3720
|
+
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
3843
3721
|
|
|
3844
3722
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3845
3723
|
export namespace readdir {
|
|
@@ -3862,7 +3740,7 @@ declare module "fs" {
|
|
|
3862
3740
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3863
3741
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3864
3742
|
*/
|
|
3865
|
-
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string
|
|
3743
|
+
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<Array<string | Buffer>>;
|
|
3866
3744
|
}
|
|
3867
3745
|
|
|
3868
3746
|
/**
|
|
@@ -3884,13 +3762,13 @@ declare module "fs" {
|
|
|
3884
3762
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3885
3763
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3886
3764
|
*/
|
|
3887
|
-
export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): string
|
|
3765
|
+
export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): Array<string | Buffer>;
|
|
3888
3766
|
|
|
3889
3767
|
/**
|
|
3890
3768
|
* Asynchronous close(2) - close a file descriptor.
|
|
3891
3769
|
* @param fd A file descriptor.
|
|
3892
3770
|
*/
|
|
3893
|
-
export function close(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3771
|
+
export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3894
3772
|
|
|
3895
3773
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3896
3774
|
export namespace close {
|
|
@@ -3912,13 +3790,13 @@ declare module "fs" {
|
|
|
3912
3790
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3913
3791
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
|
|
3914
3792
|
*/
|
|
3915
|
-
export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3793
|
+
export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
3916
3794
|
|
|
3917
3795
|
/**
|
|
3918
3796
|
* Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
|
|
3919
3797
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3920
3798
|
*/
|
|
3921
|
-
export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException
|
|
3799
|
+
export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
3922
3800
|
|
|
3923
3801
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3924
3802
|
export namespace open {
|
|
@@ -3943,7 +3821,7 @@ declare module "fs" {
|
|
|
3943
3821
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
3944
3822
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
3945
3823
|
*/
|
|
3946
|
-
export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException
|
|
3824
|
+
export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3947
3825
|
|
|
3948
3826
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3949
3827
|
export namespace utimes {
|
|
@@ -3970,7 +3848,7 @@ declare module "fs" {
|
|
|
3970
3848
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
3971
3849
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
3972
3850
|
*/
|
|
3973
|
-
export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException
|
|
3851
|
+
export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3974
3852
|
|
|
3975
3853
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3976
3854
|
export namespace futimes {
|
|
@@ -3995,7 +3873,7 @@ declare module "fs" {
|
|
|
3995
3873
|
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
3996
3874
|
* @param fd A file descriptor.
|
|
3997
3875
|
*/
|
|
3998
|
-
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3876
|
+
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3999
3877
|
|
|
4000
3878
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4001
3879
|
export namespace fsync {
|
|
@@ -4019,7 +3897,7 @@ declare module "fs" {
|
|
|
4019
3897
|
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4020
3898
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4021
3899
|
*/
|
|
4022
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3900
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4023
3901
|
|
|
4024
3902
|
/**
|
|
4025
3903
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
@@ -4027,20 +3905,20 @@ declare module "fs" {
|
|
|
4027
3905
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4028
3906
|
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4029
3907
|
*/
|
|
4030
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3908
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4031
3909
|
|
|
4032
3910
|
/**
|
|
4033
3911
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
4034
3912
|
* @param fd A file descriptor.
|
|
4035
3913
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4036
3914
|
*/
|
|
4037
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3915
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4038
3916
|
|
|
4039
3917
|
/**
|
|
4040
3918
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
4041
3919
|
* @param fd A file descriptor.
|
|
4042
3920
|
*/
|
|
4043
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException
|
|
3921
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4044
3922
|
|
|
4045
3923
|
/**
|
|
4046
3924
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
@@ -4049,7 +3927,7 @@ declare module "fs" {
|
|
|
4049
3927
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4050
3928
|
* @param encoding The expected string encoding.
|
|
4051
3929
|
*/
|
|
4052
|
-
export function write(fd: number, string: any, position: number | undefined | null, encoding: string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3930
|
+
export function write(fd: number, string: any, position: number | undefined | null, encoding: string | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4053
3931
|
|
|
4054
3932
|
/**
|
|
4055
3933
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
@@ -4057,14 +3935,14 @@ declare module "fs" {
|
|
|
4057
3935
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4058
3936
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4059
3937
|
*/
|
|
4060
|
-
export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3938
|
+
export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4061
3939
|
|
|
4062
3940
|
/**
|
|
4063
3941
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
4064
3942
|
* @param fd A file descriptor.
|
|
4065
3943
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4066
3944
|
*/
|
|
4067
|
-
export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException
|
|
3945
|
+
export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4068
3946
|
|
|
4069
3947
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4070
3948
|
export namespace write {
|
|
@@ -4113,7 +3991,7 @@ declare module "fs" {
|
|
|
4113
3991
|
* @param length The number of bytes to read.
|
|
4114
3992
|
* @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
|
|
4115
3993
|
*/
|
|
4116
|
-
export function read<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException
|
|
3994
|
+
export function read<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void): void;
|
|
4117
3995
|
|
|
4118
3996
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4119
3997
|
export namespace read {
|
|
@@ -4144,7 +4022,7 @@ declare module "fs" {
|
|
|
4144
4022
|
* @param options An object that may contain an optional flag.
|
|
4145
4023
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4146
4024
|
*/
|
|
4147
|
-
export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
4025
|
+
export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
4148
4026
|
|
|
4149
4027
|
/**
|
|
4150
4028
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -4154,7 +4032,7 @@ declare module "fs" {
|
|
|
4154
4032
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
4155
4033
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4156
4034
|
*/
|
|
4157
|
-
export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException
|
|
4035
|
+
export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
|
|
4158
4036
|
|
|
4159
4037
|
/**
|
|
4160
4038
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -4164,14 +4042,14 @@ declare module "fs" {
|
|
|
4164
4042
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
4165
4043
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4166
4044
|
*/
|
|
4167
|
-
export function readFile(path: PathLike | number, options: { encoding?: string | null; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
4045
|
+
export function readFile(path: PathLike | number, options: { encoding?: string | null; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException, data: string | Buffer) => void): void;
|
|
4168
4046
|
|
|
4169
4047
|
/**
|
|
4170
4048
|
* Asynchronously reads the entire contents of a file.
|
|
4171
4049
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4172
4050
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4173
4051
|
*/
|
|
4174
|
-
export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException
|
|
4052
|
+
export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
4175
4053
|
|
|
4176
4054
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4177
4055
|
export namespace readFile {
|
|
@@ -4246,7 +4124,7 @@ declare module "fs" {
|
|
|
4246
4124
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
4247
4125
|
* If `flag` is not supplied, the default of `'w'` is used.
|
|
4248
4126
|
*/
|
|
4249
|
-
export function writeFile(path: PathLike | number, data: any, options: { encoding?: string | null; mode?: number | string; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
4127
|
+
export function writeFile(path: PathLike | number, data: any, options: { encoding?: string | null; mode?: number | string; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4250
4128
|
|
|
4251
4129
|
/**
|
|
4252
4130
|
* Asynchronously writes data to a file, replacing the file if it already exists.
|
|
@@ -4255,7 +4133,7 @@ declare module "fs" {
|
|
|
4255
4133
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4256
4134
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
4257
4135
|
*/
|
|
4258
|
-
export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException
|
|
4136
|
+
export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4259
4137
|
|
|
4260
4138
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4261
4139
|
export namespace writeFile {
|
|
@@ -4300,7 +4178,7 @@ declare module "fs" {
|
|
|
4300
4178
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
4301
4179
|
* If `flag` is not supplied, the default of `'a'` is used.
|
|
4302
4180
|
*/
|
|
4303
|
-
export function appendFile(file: PathLike | number, data: any, options: { encoding?: string | null, mode?: string | number, flag?: string } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
4181
|
+
export function appendFile(file: PathLike | number, data: any, options: { encoding?: string | null, mode?: string | number, flag?: string } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4304
4182
|
|
|
4305
4183
|
/**
|
|
4306
4184
|
* Asynchronously append data to a file, creating the file if it does not exist.
|
|
@@ -4309,7 +4187,7 @@ declare module "fs" {
|
|
|
4309
4187
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4310
4188
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
4311
4189
|
*/
|
|
4312
|
-
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException
|
|
4190
|
+
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4313
4191
|
|
|
4314
4192
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4315
4193
|
export namespace appendFile {
|
|
@@ -4563,14 +4441,14 @@ declare module "fs" {
|
|
|
4563
4441
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
4564
4442
|
* URL support is _experimental_.
|
|
4565
4443
|
*/
|
|
4566
|
-
export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException
|
|
4444
|
+
export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4567
4445
|
|
|
4568
4446
|
/**
|
|
4569
4447
|
* Asynchronously tests a user's permissions for the file specified by path.
|
|
4570
4448
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
4571
4449
|
* URL support is _experimental_.
|
|
4572
4450
|
*/
|
|
4573
|
-
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
4451
|
+
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4574
4452
|
|
|
4575
4453
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4576
4454
|
export namespace access {
|
|
@@ -4617,14 +4495,13 @@ declare module "fs" {
|
|
|
4617
4495
|
mode?: number;
|
|
4618
4496
|
autoClose?: boolean;
|
|
4619
4497
|
start?: number;
|
|
4620
|
-
highWaterMark?: number;
|
|
4621
4498
|
}): WriteStream;
|
|
4622
4499
|
|
|
4623
4500
|
/**
|
|
4624
4501
|
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
4625
4502
|
* @param fd A file descriptor.
|
|
4626
4503
|
*/
|
|
4627
|
-
export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException
|
|
4504
|
+
export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4628
4505
|
|
|
4629
4506
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4630
4507
|
export namespace fdatasync {
|
|
@@ -4650,7 +4527,7 @@ declare module "fs" {
|
|
|
4650
4527
|
* @param src A path to the source file.
|
|
4651
4528
|
* @param dest A path to the destination file.
|
|
4652
4529
|
*/
|
|
4653
|
-
export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException
|
|
4530
|
+
export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4654
4531
|
/**
|
|
4655
4532
|
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
|
|
4656
4533
|
* No arguments other than a possible exception are given to the callback function.
|
|
@@ -4661,7 +4538,7 @@ declare module "fs" {
|
|
|
4661
4538
|
* @param dest A path to the destination file.
|
|
4662
4539
|
* @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
|
|
4663
4540
|
*/
|
|
4664
|
-
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException
|
|
4541
|
+
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4665
4542
|
|
|
4666
4543
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4667
4544
|
export namespace copyFile {
|
|
@@ -4756,7 +4633,7 @@ declare module "path" {
|
|
|
4756
4633
|
/**
|
|
4757
4634
|
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
|
4758
4635
|
*
|
|
4759
|
-
* Starting from leftmost {from}
|
|
4636
|
+
* Starting from leftmost {from} paramter, resolves {to} to an absolute path.
|
|
4760
4637
|
*
|
|
4761
4638
|
* If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.
|
|
4762
4639
|
*
|
|
@@ -4798,11 +4675,11 @@ declare module "path" {
|
|
|
4798
4675
|
/**
|
|
4799
4676
|
* The platform-specific file separator. '\\' or '/'.
|
|
4800
4677
|
*/
|
|
4801
|
-
export var sep:
|
|
4678
|
+
export var sep: string;
|
|
4802
4679
|
/**
|
|
4803
4680
|
* The platform-specific file delimiter. ';' or ':'.
|
|
4804
4681
|
*/
|
|
4805
|
-
export var delimiter:
|
|
4682
|
+
export var delimiter: string;
|
|
4806
4683
|
/**
|
|
4807
4684
|
* Returns an object from a path string - the opposite of format().
|
|
4808
4685
|
*
|
|
@@ -4957,7 +4834,7 @@ declare module "tls" {
|
|
|
4957
4834
|
* An array of strings or a Buffer naming possible NPN protocols.
|
|
4958
4835
|
* (Protocols should be ordered by their priority.)
|
|
4959
4836
|
*/
|
|
4960
|
-
NPNProtocols?: string[] | Buffer
|
|
4837
|
+
NPNProtocols?: string[] | Buffer,
|
|
4961
4838
|
/**
|
|
4962
4839
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
4963
4840
|
* (Protocols should be ordered by their priority.) When the server
|
|
@@ -4965,7 +4842,7 @@ declare module "tls" {
|
|
|
4965
4842
|
* precedence over NPN and the server does not send an NPN extension
|
|
4966
4843
|
* to the client.
|
|
4967
4844
|
*/
|
|
4968
|
-
ALPNProtocols?: string[] | Buffer
|
|
4845
|
+
ALPNProtocols?: string[] | Buffer,
|
|
4969
4846
|
/**
|
|
4970
4847
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
4971
4848
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -5020,14 +4897,6 @@ declare module "tls" {
|
|
|
5020
4897
|
getPeerCertificate(detailed: true): DetailedPeerCertificate;
|
|
5021
4898
|
getPeerCertificate(detailed?: false): PeerCertificate;
|
|
5022
4899
|
getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
|
|
5023
|
-
/**
|
|
5024
|
-
* Returns a string containing the negotiated SSL/TLS protocol version of the current connection.
|
|
5025
|
-
* The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process.
|
|
5026
|
-
* The value `null` will be returned for server sockets or disconnected client sockets.
|
|
5027
|
-
* See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information.
|
|
5028
|
-
* @returns negotiated SSL/TLS protocol version of the current connection
|
|
5029
|
-
*/
|
|
5030
|
-
getProtocol(): string | null;
|
|
5031
4900
|
/**
|
|
5032
4901
|
* Could be used to speed up handshake establishment when reconnecting to the server.
|
|
5033
4902
|
* @returns ASN.1 encoded TLS session or undefined if none was negotiated.
|
|
@@ -5049,7 +4918,7 @@ declare module "tls" {
|
|
|
5049
4918
|
* @param callback - callback(err) will be executed with null as err, once the renegotiation
|
|
5050
4919
|
* is successfully completed.
|
|
5051
4920
|
*/
|
|
5052
|
-
renegotiate(options:
|
|
4921
|
+
renegotiate(options: TlsOptions, callback: (err: Error | null) => void): any;
|
|
5053
4922
|
/**
|
|
5054
4923
|
* Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
5055
4924
|
* Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
|
|
@@ -5092,15 +4961,30 @@ declare module "tls" {
|
|
|
5092
4961
|
prependOnceListener(event: "secureConnect", listener: () => void): this;
|
|
5093
4962
|
}
|
|
5094
4963
|
|
|
5095
|
-
export interface TlsOptions
|
|
5096
|
-
|
|
4964
|
+
export interface TlsOptions {
|
|
4965
|
+
host?: string;
|
|
4966
|
+
port?: number;
|
|
4967
|
+
pfx?: string | Buffer[];
|
|
4968
|
+
key?: string | string[] | Buffer | any[];
|
|
4969
|
+
passphrase?: string;
|
|
4970
|
+
cert?: string | string[] | Buffer | Buffer[];
|
|
4971
|
+
ca?: string | string[] | Buffer | Buffer[];
|
|
4972
|
+
crl?: string | string[];
|
|
4973
|
+
ciphers?: string;
|
|
4974
|
+
honorCipherOrder?: boolean;
|
|
5097
4975
|
requestCert?: boolean;
|
|
5098
4976
|
rejectUnauthorized?: boolean;
|
|
5099
|
-
NPNProtocols?: string[] | Buffer
|
|
5100
|
-
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4977
|
+
NPNProtocols?: string[] | Buffer;
|
|
5101
4978
|
SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
|
|
4979
|
+
ecdhCurve?: string;
|
|
4980
|
+
dhparam?: string | Buffer;
|
|
4981
|
+
handshakeTimeout?: number;
|
|
4982
|
+
ALPNProtocols?: string[] | Buffer;
|
|
5102
4983
|
sessionTimeout?: number;
|
|
5103
4984
|
ticketKeys?: Buffer;
|
|
4985
|
+
sessionIdContext?: string;
|
|
4986
|
+
secureProtocol?: string;
|
|
4987
|
+
secureOptions?: number;
|
|
5104
4988
|
}
|
|
5105
4989
|
|
|
5106
4990
|
export interface ConnectionOptions extends SecureContextOptions {
|
|
@@ -5109,8 +4993,8 @@ declare module "tls" {
|
|
|
5109
4993
|
path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
5110
4994
|
socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
|
|
5111
4995
|
rejectUnauthorized?: boolean; // Defaults to true
|
|
5112
|
-
NPNProtocols?: string
|
|
5113
|
-
ALPNProtocols?: string
|
|
4996
|
+
NPNProtocols?: Array<string | Buffer>;
|
|
4997
|
+
ALPNProtocols?: Array<string | Buffer>;
|
|
5114
4998
|
checkServerIdentity?: typeof checkServerIdentity;
|
|
5115
4999
|
servername?: string; // SNI TLS Extension
|
|
5116
5000
|
session?: Buffer;
|
|
@@ -5239,7 +5123,6 @@ declare module "tls" {
|
|
|
5239
5123
|
}
|
|
5240
5124
|
|
|
5241
5125
|
declare module "crypto" {
|
|
5242
|
-
import * as stream from "stream";
|
|
5243
5126
|
export interface Certificate {
|
|
5244
5127
|
exportChallenge(spkac: string | Buffer): Buffer;
|
|
5245
5128
|
exportPublicKey(spkac: string | Buffer): Buffer;
|
|
@@ -5261,9 +5144,7 @@ declare module "crypto" {
|
|
|
5261
5144
|
crl: string | string[];
|
|
5262
5145
|
ciphers: string;
|
|
5263
5146
|
}
|
|
5264
|
-
/** @deprecated since v0.11.13 - use tls.SecureContext instead. */
|
|
5265
5147
|
export interface Credentials { context?: any; }
|
|
5266
|
-
/** @deprecated since v0.11.13 - use tls.createSecureContext instead. */
|
|
5267
5148
|
export function createCredentials(details: CredentialDetails): Credentials;
|
|
5268
5149
|
export function createHash(algorithm: string): Hash;
|
|
5269
5150
|
export function createHmac(algorithm: string, key: string | Buffer): Hmac;
|
|
@@ -5274,13 +5155,13 @@ declare module "crypto" {
|
|
|
5274
5155
|
type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
|
|
5275
5156
|
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
|
|
5276
5157
|
|
|
5277
|
-
export interface Hash extends
|
|
5158
|
+
export interface Hash extends NodeJS.ReadWriteStream {
|
|
5278
5159
|
update(data: string | Buffer | DataView): Hash;
|
|
5279
5160
|
update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hash;
|
|
5280
5161
|
digest(): Buffer;
|
|
5281
5162
|
digest(encoding: HexBase64Latin1Encoding): string;
|
|
5282
5163
|
}
|
|
5283
|
-
export interface Hmac extends
|
|
5164
|
+
export interface Hmac extends NodeJS.ReadWriteStream {
|
|
5284
5165
|
update(data: string | Buffer | DataView): Hmac;
|
|
5285
5166
|
update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
|
|
5286
5167
|
digest(): Buffer;
|
|
@@ -5288,36 +5169,36 @@ declare module "crypto" {
|
|
|
5288
5169
|
}
|
|
5289
5170
|
export function createCipher(algorithm: string, password: any): Cipher;
|
|
5290
5171
|
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
|
|
5291
|
-
export interface Cipher extends
|
|
5172
|
+
export interface Cipher extends NodeJS.ReadWriteStream {
|
|
5292
5173
|
update(data: Buffer | DataView): Buffer;
|
|
5293
5174
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
|
|
5294
5175
|
update(data: Buffer | DataView, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string;
|
|
5295
5176
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string;
|
|
5296
5177
|
final(): Buffer;
|
|
5297
5178
|
final(output_encoding: string): string;
|
|
5298
|
-
setAutoPadding(auto_padding?: boolean):
|
|
5179
|
+
setAutoPadding(auto_padding?: boolean): void;
|
|
5299
5180
|
getAuthTag(): Buffer;
|
|
5300
|
-
setAAD(buffer: Buffer):
|
|
5181
|
+
setAAD(buffer: Buffer): void;
|
|
5301
5182
|
}
|
|
5302
5183
|
export function createDecipher(algorithm: string, password: any): Decipher;
|
|
5303
5184
|
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
|
|
5304
|
-
export interface Decipher extends
|
|
5185
|
+
export interface Decipher extends NodeJS.ReadWriteStream {
|
|
5305
5186
|
update(data: Buffer | DataView): Buffer;
|
|
5306
5187
|
update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
|
|
5307
5188
|
update(data: Buffer | DataView, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string;
|
|
5308
5189
|
update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string;
|
|
5309
5190
|
final(): Buffer;
|
|
5310
5191
|
final(output_encoding: string): string;
|
|
5311
|
-
setAutoPadding(auto_padding?: boolean):
|
|
5312
|
-
setAuthTag(tag: Buffer):
|
|
5313
|
-
setAAD(buffer: Buffer):
|
|
5192
|
+
setAutoPadding(auto_padding?: boolean): void;
|
|
5193
|
+
setAuthTag(tag: Buffer): void;
|
|
5194
|
+
setAAD(buffer: Buffer): void;
|
|
5314
5195
|
}
|
|
5315
5196
|
export function createSign(algorithm: string): Signer;
|
|
5316
5197
|
export interface Signer extends NodeJS.WritableStream {
|
|
5317
5198
|
update(data: string | Buffer | DataView): Signer;
|
|
5318
5199
|
update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Signer;
|
|
5319
|
-
sign(private_key: string | { key: string; passphrase
|
|
5320
|
-
sign(private_key: string | { key: string; passphrase
|
|
5200
|
+
sign(private_key: string | { key: string; passphrase: string }): Buffer;
|
|
5201
|
+
sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string;
|
|
5321
5202
|
}
|
|
5322
5203
|
export function createVerify(algorith: string): Verify;
|
|
5323
5204
|
export interface Verify extends NodeJS.WritableStream {
|
|
@@ -5418,12 +5299,12 @@ declare module "stream" {
|
|
|
5418
5299
|
encoding?: string;
|
|
5419
5300
|
objectMode?: boolean;
|
|
5420
5301
|
read?: (this: Readable, size?: number) => any;
|
|
5421
|
-
destroy?: (error
|
|
5302
|
+
destroy?: (error?: Error) => any;
|
|
5422
5303
|
}
|
|
5423
5304
|
|
|
5424
5305
|
export class Readable extends Stream implements NodeJS.ReadableStream {
|
|
5425
5306
|
readable: boolean;
|
|
5426
|
-
|
|
5307
|
+
readableHighWaterMark: number;
|
|
5427
5308
|
constructor(opts?: ReadableOptions);
|
|
5428
5309
|
_read(size: number): void;
|
|
5429
5310
|
read(size?: number): any;
|
|
@@ -5435,7 +5316,7 @@ declare module "stream" {
|
|
|
5435
5316
|
unshift(chunk: any): void;
|
|
5436
5317
|
wrap(oldStream: NodeJS.ReadableStream): this;
|
|
5437
5318
|
push(chunk: any, encoding?: string): boolean;
|
|
5438
|
-
_destroy(
|
|
5319
|
+
_destroy(err: Error, callback: Function): void;
|
|
5439
5320
|
destroy(error?: Error): void;
|
|
5440
5321
|
|
|
5441
5322
|
/**
|
|
@@ -5448,6 +5329,7 @@ declare module "stream" {
|
|
|
5448
5329
|
* 5. error
|
|
5449
5330
|
*/
|
|
5450
5331
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
5332
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
5451
5333
|
addListener(event: "close", listener: () => void): this;
|
|
5452
5334
|
addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
|
|
5453
5335
|
addListener(event: "end", listener: () => void): this;
|
|
@@ -5501,9 +5383,9 @@ declare module "stream" {
|
|
|
5501
5383
|
highWaterMark?: number;
|
|
5502
5384
|
decodeStrings?: boolean;
|
|
5503
5385
|
objectMode?: boolean;
|
|
5504
|
-
write?: (chunk:
|
|
5505
|
-
writev?: (chunks: Array<{ chunk:
|
|
5506
|
-
destroy?: (error
|
|
5386
|
+
write?: (chunk: string | Buffer, encoding: string, callback: Function) => any;
|
|
5387
|
+
writev?: (chunks: Array<{ chunk: string | Buffer, encoding: string }>, callback: Function) => any;
|
|
5388
|
+
destroy?: (error?: Error) => any;
|
|
5507
5389
|
final?: (callback: (error?: Error) => void) => void;
|
|
5508
5390
|
}
|
|
5509
5391
|
|
|
@@ -5512,8 +5394,8 @@ declare module "stream" {
|
|
|
5512
5394
|
readonly writableHighWaterMark: number;
|
|
5513
5395
|
constructor(opts?: WritableOptions);
|
|
5514
5396
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5515
|
-
_writev?(chunks: Array<{
|
|
5516
|
-
_destroy(
|
|
5397
|
+
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5398
|
+
_destroy(err: Error, callback: Function): void;
|
|
5517
5399
|
_final(callback: Function): void;
|
|
5518
5400
|
write(chunk: any, cb?: Function): boolean;
|
|
5519
5401
|
write(chunk: any, encoding?: string, cb?: Function): boolean;
|
|
@@ -5604,8 +5486,8 @@ declare module "stream" {
|
|
|
5604
5486
|
readonly writableHighWaterMark: number;
|
|
5605
5487
|
constructor(opts?: DuplexOptions);
|
|
5606
5488
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5607
|
-
_writev?(chunks: Array<{
|
|
5608
|
-
_destroy(
|
|
5489
|
+
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5490
|
+
_destroy(err: Error, callback: Function): void;
|
|
5609
5491
|
_final(callback: Function): void;
|
|
5610
5492
|
write(chunk: any, cb?: Function): boolean;
|
|
5611
5493
|
write(chunk: any, encoding?: string, cb?: Function): boolean;
|
|
@@ -5618,7 +5500,7 @@ declare module "stream" {
|
|
|
5618
5500
|
}
|
|
5619
5501
|
|
|
5620
5502
|
export interface TransformOptions extends DuplexOptions {
|
|
5621
|
-
transform?: (chunk:
|
|
5503
|
+
transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any;
|
|
5622
5504
|
flush?: (callback: Function) => any;
|
|
5623
5505
|
}
|
|
5624
5506
|
|
|
@@ -5629,13 +5511,6 @@ declare module "stream" {
|
|
|
5629
5511
|
}
|
|
5630
5512
|
|
|
5631
5513
|
export class PassThrough extends Transform { }
|
|
5632
|
-
|
|
5633
|
-
interface Pipe {
|
|
5634
|
-
close(): void;
|
|
5635
|
-
hasRef(): boolean;
|
|
5636
|
-
ref(): void;
|
|
5637
|
-
unref(): void;
|
|
5638
|
-
}
|
|
5639
5514
|
}
|
|
5640
5515
|
|
|
5641
5516
|
export = internal;
|
|
@@ -5649,17 +5524,18 @@ declare module "util" {
|
|
|
5649
5524
|
export function puts(...param: any[]): void;
|
|
5650
5525
|
export function print(...param: any[]): void;
|
|
5651
5526
|
export function log(string: string): void;
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5527
|
+
export var inspect: {
|
|
5528
|
+
(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
|
5529
|
+
(object: any, options: InspectOptions): string;
|
|
5530
|
+
colors: {
|
|
5656
5531
|
[color: string]: [number, number] | undefined
|
|
5657
|
-
}
|
|
5658
|
-
|
|
5532
|
+
}
|
|
5533
|
+
styles: {
|
|
5659
5534
|
[style: string]: string | undefined
|
|
5660
|
-
}
|
|
5661
|
-
|
|
5662
|
-
|
|
5535
|
+
}
|
|
5536
|
+
defaultOptions: InspectOptions;
|
|
5537
|
+
custom: symbol;
|
|
5538
|
+
};
|
|
5663
5539
|
export function isArray(object: any): object is any[];
|
|
5664
5540
|
export function isRegExp(object: any): object is RegExp;
|
|
5665
5541
|
export function isDate(object: any): object is Date;
|
|
@@ -5677,72 +5553,43 @@ declare module "util" {
|
|
|
5677
5553
|
export function isString(object: any): object is string;
|
|
5678
5554
|
export function isSymbol(object: any): object is symbol;
|
|
5679
5555
|
export function isUndefined(object: any): object is undefined;
|
|
5680
|
-
export function deprecate<T extends Function>(fn: T, message: string
|
|
5556
|
+
export function deprecate<T extends Function>(fn: T, message: string): T;
|
|
5681
5557
|
|
|
5682
5558
|
export interface CustomPromisify<TCustom extends Function> extends Function {
|
|
5683
5559
|
__promisify__: TCustom;
|
|
5684
5560
|
}
|
|
5685
5561
|
|
|
5686
5562
|
export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5687
|
-
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException
|
|
5563
|
+
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5688
5564
|
export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5689
|
-
export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException
|
|
5565
|
+
export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5690
5566
|
export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5691
|
-
export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException
|
|
5567
|
+
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;
|
|
5692
5568
|
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;
|
|
5693
|
-
export function callbackify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3,
|
|
5569
|
+
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;
|
|
5694
5570
|
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;
|
|
5695
|
-
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,
|
|
5571
|
+
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;
|
|
5696
5572
|
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;
|
|
5697
|
-
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
|
|
5573
|
+
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;
|
|
5698
5574
|
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;
|
|
5699
|
-
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException
|
|
5575
|
+
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5700
5576
|
|
|
5701
5577
|
export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
|
5702
|
-
export function promisify<TResult>(fn: (callback: (err: Error
|
|
5703
|
-
export function promisify(fn: (callback: (err
|
|
5704
|
-
export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error
|
|
5705
|
-
export function promisify<T1>(fn: (arg1: T1, callback: (err
|
|
5706
|
-
export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error
|
|
5707
|
-
export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err
|
|
5708
|
-
export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error
|
|
5709
|
-
export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err
|
|
5710
|
-
export function promisify<T1, T2, T3, T4, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error
|
|
5711
|
-
export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err
|
|
5712
|
-
export function promisify<T1, T2, T3, T4, T5, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error
|
|
5713
|
-
export function promisify<T1, T2, T3, T4, T5>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err
|
|
5578
|
+
export function promisify<TResult>(fn: (callback: (err: Error, result: TResult) => void) => void): () => Promise<TResult>;
|
|
5579
|
+
export function promisify(fn: (callback: (err: Error) => void) => void): () => Promise<void>;
|
|
5580
|
+
export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
|
5581
|
+
export function promisify<T1>(fn: (arg1: T1, callback: (err: Error) => void) => void): (arg1: T1) => Promise<void>;
|
|
5582
|
+
export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
|
5583
|
+
export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
|
5584
|
+
export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
|
5585
|
+
export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
|
5586
|
+
export function promisify<T1, T2, T3, T4, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
|
5587
|
+
export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
|
5588
|
+
export function promisify<T1, T2, T3, T4, T5, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
|
5589
|
+
export function promisify<T1, T2, T3, T4, T5>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
|
5714
5590
|
export function promisify(fn: Function): Function;
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
readonly encoding: string;
|
|
5718
|
-
readonly fatal: boolean;
|
|
5719
|
-
readonly ignoreBOM: boolean;
|
|
5720
|
-
constructor(
|
|
5721
|
-
encoding?: string,
|
|
5722
|
-
options?: { fatal?: boolean; ignoreBOM?: boolean }
|
|
5723
|
-
);
|
|
5724
|
-
decode(
|
|
5725
|
-
input?:
|
|
5726
|
-
Int8Array
|
|
5727
|
-
| Int16Array
|
|
5728
|
-
| Int32Array
|
|
5729
|
-
| Uint8Array
|
|
5730
|
-
| Uint16Array
|
|
5731
|
-
| Uint32Array
|
|
5732
|
-
| Uint8ClampedArray
|
|
5733
|
-
| Float32Array
|
|
5734
|
-
| Float64Array
|
|
5735
|
-
| DataView
|
|
5736
|
-
| ArrayBuffer
|
|
5737
|
-
| null,
|
|
5738
|
-
options?: { stream?: boolean }
|
|
5739
|
-
): string;
|
|
5740
|
-
}
|
|
5741
|
-
|
|
5742
|
-
export class TextEncoder {
|
|
5743
|
-
readonly encoding: string;
|
|
5744
|
-
constructor();
|
|
5745
|
-
encode(input?: string): Uint8Array;
|
|
5591
|
+
export namespace promisify {
|
|
5592
|
+
const custom: symbol;
|
|
5746
5593
|
}
|
|
5747
5594
|
}
|
|
5748
5595
|
|
|
@@ -5756,30 +5603,34 @@ declare module "assert" {
|
|
|
5756
5603
|
expected: any;
|
|
5757
5604
|
operator: string;
|
|
5758
5605
|
generatedMessage: boolean;
|
|
5759
|
-
code: 'ERR_ASSERTION';
|
|
5760
5606
|
|
|
5761
5607
|
constructor(options?: {
|
|
5762
5608
|
message?: string; actual?: any; expected?: any;
|
|
5763
|
-
operator?: string;
|
|
5609
|
+
operator?: string; stackStartFunction?: Function
|
|
5764
5610
|
});
|
|
5765
5611
|
}
|
|
5766
5612
|
|
|
5767
|
-
export function fail(message
|
|
5768
|
-
export function fail(actual: any, expected: any, message?: string, operator?: string
|
|
5613
|
+
export function fail(message: string): void;
|
|
5614
|
+
export function fail(actual: any, expected: any, message?: string, operator?: string): void;
|
|
5769
5615
|
export function ok(value: any, message?: string): void;
|
|
5770
5616
|
export function equal(actual: any, expected: any, message?: string): void;
|
|
5771
5617
|
export function notEqual(actual: any, expected: any, message?: string): void;
|
|
5772
5618
|
export function deepEqual(actual: any, expected: any, message?: string): void;
|
|
5773
|
-
export function notDeepEqual(
|
|
5619
|
+
export function notDeepEqual(acutal: any, expected: any, message?: string): void;
|
|
5774
5620
|
export function strictEqual(actual: any, expected: any, message?: string): void;
|
|
5775
5621
|
export function notStrictEqual(actual: any, expected: any, message?: string): void;
|
|
5776
5622
|
export function deepStrictEqual(actual: any, expected: any, message?: string): void;
|
|
5777
5623
|
export function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
|
|
5778
5624
|
|
|
5779
5625
|
export function throws(block: Function, message?: string): void;
|
|
5780
|
-
export function throws(block: Function, error:
|
|
5626
|
+
export function throws(block: Function, error: Function, message?: string): void;
|
|
5627
|
+
export function throws(block: Function, error: RegExp, message?: string): void;
|
|
5628
|
+
export function throws(block: Function, error: (err: any) => boolean, message?: string): void;
|
|
5629
|
+
|
|
5781
5630
|
export function doesNotThrow(block: Function, message?: string): void;
|
|
5782
|
-
export function doesNotThrow(block: Function, error:
|
|
5631
|
+
export function doesNotThrow(block: Function, error: Function, message?: string): void;
|
|
5632
|
+
export function doesNotThrow(block: Function, error: RegExp, message?: string): void;
|
|
5633
|
+
export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void;
|
|
5783
5634
|
|
|
5784
5635
|
export function ifError(value: any): void;
|
|
5785
5636
|
}
|
|
@@ -5791,12 +5642,12 @@ declare module "tty" {
|
|
|
5791
5642
|
import * as net from "net";
|
|
5792
5643
|
|
|
5793
5644
|
export function isatty(fd: number): boolean;
|
|
5794
|
-
export
|
|
5645
|
+
export interface ReadStream extends net.Socket {
|
|
5795
5646
|
isRaw: boolean;
|
|
5796
5647
|
setRawMode(mode: boolean): void;
|
|
5797
5648
|
isTTY: boolean;
|
|
5798
5649
|
}
|
|
5799
|
-
export
|
|
5650
|
+
export interface WriteStream extends net.Socket {
|
|
5800
5651
|
columns: number;
|
|
5801
5652
|
rows: number;
|
|
5802
5653
|
isTTY: boolean;
|
|
@@ -5812,8 +5663,6 @@ declare module "domain" {
|
|
|
5812
5663
|
remove(emitter: events.EventEmitter): void;
|
|
5813
5664
|
bind(cb: (err: Error, data: any) => any): any;
|
|
5814
5665
|
intercept(cb: (data: any) => any): any;
|
|
5815
|
-
/** @deprecated since v0.11.7 - recover from failed I/O actions explicitly via error event handlers set on the domain instead. */
|
|
5816
|
-
dispose(): void;
|
|
5817
5666
|
members: any[];
|
|
5818
5667
|
enter(): void;
|
|
5819
5668
|
exit(): void;
|
|
@@ -5822,7 +5671,6 @@ declare module "domain" {
|
|
|
5822
5671
|
export function create(): Domain;
|
|
5823
5672
|
}
|
|
5824
5673
|
|
|
5825
|
-
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
|
|
5826
5674
|
declare module "constants" {
|
|
5827
5675
|
export var E2BIG: number;
|
|
5828
5676
|
export var EACCES: number;
|
|
@@ -5958,25 +5806,15 @@ declare module "constants" {
|
|
|
5958
5806
|
export var WSA_E_NO_MORE: number;
|
|
5959
5807
|
export var WSA_E_CANCELLED: number;
|
|
5960
5808
|
export var WSAEREFUSED: number;
|
|
5961
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGHUP` instead. */
|
|
5962
5809
|
export var SIGHUP: number;
|
|
5963
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGINT` instead. */
|
|
5964
5810
|
export var SIGINT: number;
|
|
5965
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGILL` instead. */
|
|
5966
5811
|
export var SIGILL: number;
|
|
5967
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGABRT` instead. */
|
|
5968
5812
|
export var SIGABRT: number;
|
|
5969
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGFPE` instead. */
|
|
5970
5813
|
export var SIGFPE: number;
|
|
5971
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGKILL` instead. */
|
|
5972
5814
|
export var SIGKILL: number;
|
|
5973
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSEGV` instead. */
|
|
5974
5815
|
export var SIGSEGV: number;
|
|
5975
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTERM` instead. */
|
|
5976
5816
|
export var SIGTERM: number;
|
|
5977
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGBREAK` instead. */
|
|
5978
5817
|
export var SIGBREAK: number;
|
|
5979
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGWINCH` instead. */
|
|
5980
5818
|
export var SIGWINCH: number;
|
|
5981
5819
|
export var SSL_OP_ALL: number;
|
|
5982
5820
|
export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
|
|
@@ -6079,55 +5917,30 @@ declare module "constants" {
|
|
|
6079
5917
|
export var W_OK: number;
|
|
6080
5918
|
export var X_OK: number;
|
|
6081
5919
|
export var UV_UDP_REUSEADDR: number;
|
|
6082
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGQUIT` instead. */
|
|
6083
5920
|
export var SIGQUIT: number;
|
|
6084
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTRAP` instead. */
|
|
6085
5921
|
export var SIGTRAP: number;
|
|
6086
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGIOT` instead. */
|
|
6087
5922
|
export var SIGIOT: number;
|
|
6088
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGBUS` instead. */
|
|
6089
5923
|
export var SIGBUS: number;
|
|
6090
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR1` instead. */
|
|
6091
5924
|
export var SIGUSR1: number;
|
|
6092
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR2` instead. */
|
|
6093
5925
|
export var SIGUSR2: number;
|
|
6094
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPIPE` instead. */
|
|
6095
5926
|
export var SIGPIPE: number;
|
|
6096
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGALRM` instead. */
|
|
6097
5927
|
export var SIGALRM: number;
|
|
6098
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGCHLD` instead. */
|
|
6099
5928
|
export var SIGCHLD: number;
|
|
6100
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTKFLT` instead. */
|
|
6101
5929
|
export var SIGSTKFLT: number;
|
|
6102
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGCONT` instead. */
|
|
6103
5930
|
export var SIGCONT: number;
|
|
6104
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTOP` instead. */
|
|
6105
5931
|
export var SIGSTOP: number;
|
|
6106
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTSTP` instead. */
|
|
6107
5932
|
export var SIGTSTP: number;
|
|
6108
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTIN` instead. */
|
|
6109
5933
|
export var SIGTTIN: number;
|
|
6110
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTOU` instead. */
|
|
6111
5934
|
export var SIGTTOU: number;
|
|
6112
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGURG` instead. */
|
|
6113
5935
|
export var SIGURG: number;
|
|
6114
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGXCPU` instead. */
|
|
6115
5936
|
export var SIGXCPU: number;
|
|
6116
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGXFSZ` instead. */
|
|
6117
5937
|
export var SIGXFSZ: number;
|
|
6118
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGVTALRM` instead. */
|
|
6119
5938
|
export var SIGVTALRM: number;
|
|
6120
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPROF` instead. */
|
|
6121
5939
|
export var SIGPROF: number;
|
|
6122
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGIO` instead. */
|
|
6123
5940
|
export var SIGIO: number;
|
|
6124
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPOLL` instead. */
|
|
6125
5941
|
export var SIGPOLL: number;
|
|
6126
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPWR` instead. */
|
|
6127
5942
|
export var SIGPWR: number;
|
|
6128
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSYS` instead. */
|
|
6129
5943
|
export var SIGSYS: number;
|
|
6130
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUNUSED` instead. */
|
|
6131
5944
|
export var SIGUNUSED: number;
|
|
6132
5945
|
export var defaultCoreCipherList: string;
|
|
6133
5946
|
export var defaultCipherList: string;
|
|
@@ -6143,7 +5956,6 @@ declare module "process" {
|
|
|
6143
5956
|
export = process;
|
|
6144
5957
|
}
|
|
6145
5958
|
|
|
6146
|
-
// tslint:disable-next-line:no-declare-current-package
|
|
6147
5959
|
declare module "v8" {
|
|
6148
5960
|
interface HeapSpaceInfo {
|
|
6149
5961
|
space_name: string;
|
|
@@ -6268,23 +6080,6 @@ declare module "async_hooks" {
|
|
|
6268
6080
|
*/
|
|
6269
6081
|
export function createHook(options: HookCallbacks): AsyncHook;
|
|
6270
6082
|
|
|
6271
|
-
export interface AsyncResourceOptions {
|
|
6272
|
-
/**
|
|
6273
|
-
* The ID of the execution context that created this async event.
|
|
6274
|
-
* Default: `executionAsyncId()`
|
|
6275
|
-
*/
|
|
6276
|
-
triggerAsyncId?: number;
|
|
6277
|
-
|
|
6278
|
-
/**
|
|
6279
|
-
* Disables automatic `emitDestroy` when the object is garbage collected.
|
|
6280
|
-
* This usually does not need to be set (even if `emitDestroy` is called
|
|
6281
|
-
* manually), unless the resource's `asyncId` is retrieved and the
|
|
6282
|
-
* sensitive API's `emitDestroy` is called with it.
|
|
6283
|
-
* Default: `false`
|
|
6284
|
-
*/
|
|
6285
|
-
requireManualDestroy?: boolean;
|
|
6286
|
-
}
|
|
6287
|
-
|
|
6288
6083
|
/**
|
|
6289
6084
|
* The class AsyncResource was designed to be extended by the embedder's async resources.
|
|
6290
6085
|
* Using this users can easily trigger the lifetime events of their own resources.
|
|
@@ -6294,12 +6089,10 @@ declare module "async_hooks" {
|
|
|
6294
6089
|
* AsyncResource() is meant to be extended. Instantiating a
|
|
6295
6090
|
* new AsyncResource() also triggers init. If triggerAsyncId is omitted then
|
|
6296
6091
|
* async_hook.executionAsyncId() is used.
|
|
6297
|
-
* @param type
|
|
6298
|
-
* @param triggerAsyncId
|
|
6299
|
-
* this async event (default: `executionAsyncId()`), or an
|
|
6300
|
-
* AsyncResourceOptions object (since 8.10)
|
|
6092
|
+
* @param type the name of this async resource type
|
|
6093
|
+
* @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
|
|
6301
6094
|
*/
|
|
6302
|
-
constructor(type: string, triggerAsyncId?: number
|
|
6095
|
+
constructor(type: string, triggerAsyncId?: number)
|
|
6303
6096
|
|
|
6304
6097
|
/**
|
|
6305
6098
|
* Call AsyncHooks before callbacks.
|
|
@@ -6368,14 +6161,14 @@ declare module "http2" {
|
|
|
6368
6161
|
}
|
|
6369
6162
|
|
|
6370
6163
|
export interface ServerStreamFileResponseOptions {
|
|
6371
|
-
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void
|
|
6164
|
+
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void|boolean;
|
|
6372
6165
|
getTrailers?: (trailers: OutgoingHttpHeaders) => void;
|
|
6373
6166
|
offset?: number;
|
|
6374
6167
|
length?: number;
|
|
6375
6168
|
}
|
|
6376
6169
|
|
|
6377
6170
|
export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
|
|
6378
|
-
onError?: (err: NodeJS.ErrnoException
|
|
6171
|
+
onError?: (err: NodeJS.ErrnoException) => void;
|
|
6379
6172
|
}
|
|
6380
6173
|
|
|
6381
6174
|
export interface Http2Stream extends stream.Duplex {
|
|
@@ -6716,7 +6509,9 @@ declare module "http2" {
|
|
|
6716
6509
|
export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
|
|
6717
6510
|
export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
|
|
6718
6511
|
|
|
6719
|
-
export interface ServerOptions extends ServerSessionOptions {
|
|
6512
|
+
export interface ServerOptions extends ServerSessionOptions {
|
|
6513
|
+
allowHTTP1?: boolean;
|
|
6514
|
+
}
|
|
6720
6515
|
|
|
6721
6516
|
export interface SecureServerOptions extends SecureServerSessionOptions {
|
|
6722
6517
|
allowHTTP1?: boolean;
|
|
@@ -6816,8 +6611,7 @@ declare module "http2" {
|
|
|
6816
6611
|
prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
|
|
6817
6612
|
}
|
|
6818
6613
|
|
|
6819
|
-
export
|
|
6820
|
-
private constructor();
|
|
6614
|
+
export interface Http2ServerRequest extends stream.Readable {
|
|
6821
6615
|
headers: IncomingHttpHeaders;
|
|
6822
6616
|
httpVersion: string;
|
|
6823
6617
|
method: string;
|
|
@@ -6848,8 +6642,7 @@ declare module "http2" {
|
|
|
6848
6642
|
prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
|
|
6849
6643
|
}
|
|
6850
6644
|
|
|
6851
|
-
export
|
|
6852
|
-
private constructor();
|
|
6645
|
+
export interface Http2ServerResponse extends events.EventEmitter {
|
|
6853
6646
|
addTrailers(trailers: OutgoingHttpHeaders): void;
|
|
6854
6647
|
connection: net.Socket | tls.TLSSocket;
|
|
6855
6648
|
end(callback?: () => void): void;
|