@types/node 8.10.64 → 9.4.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 +331 -530
- node v8.10/inspector.d.ts → node/inspector.d.ts +6 -30
- node v8.10/package.json → node/package.json +24 -53
- node v8.10/README.md +0 -16
- node v8.10/index.d.ts +0 -48
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Type definitions for Node.js 9.4.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.
|
|
@@ -389,6 +410,7 @@ declare namespace NodeJS {
|
|
|
389
410
|
setMaxListeners(n: number): this;
|
|
390
411
|
getMaxListeners(): number;
|
|
391
412
|
listeners(event: string | symbol): Function[];
|
|
413
|
+
rawListeners(event: string | symbol): Function[];
|
|
392
414
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
393
415
|
listenerCount(type: string | symbol): number;
|
|
394
416
|
// Added in Node 6...
|
|
@@ -431,8 +453,6 @@ declare namespace NodeJS {
|
|
|
431
453
|
remove(emitter: Events): void;
|
|
432
454
|
bind(cb: (err: Error, data: any) => any): any;
|
|
433
455
|
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
456
|
|
|
437
457
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
438
458
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
@@ -445,7 +465,6 @@ declare namespace NodeJS {
|
|
|
445
465
|
rss: number;
|
|
446
466
|
heapTotal: number;
|
|
447
467
|
heapUsed: number;
|
|
448
|
-
external: number;
|
|
449
468
|
}
|
|
450
469
|
|
|
451
470
|
export interface CpuUsage {
|
|
@@ -453,14 +472,6 @@ declare namespace NodeJS {
|
|
|
453
472
|
system: number;
|
|
454
473
|
}
|
|
455
474
|
|
|
456
|
-
export interface ProcessRelease {
|
|
457
|
-
name: string;
|
|
458
|
-
sourceUrl?: string;
|
|
459
|
-
headersUrl?: string;
|
|
460
|
-
libUrl?: string;
|
|
461
|
-
lts?: string;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
475
|
export interface ProcessVersions {
|
|
465
476
|
http_parser: string;
|
|
466
477
|
node: string;
|
|
@@ -493,10 +504,10 @@ declare namespace NodeJS {
|
|
|
493
504
|
type ExitListener = (code: number) => void;
|
|
494
505
|
type RejectionHandledListener = (promise: Promise<any>) => void;
|
|
495
506
|
type UncaughtExceptionListener = (error: Error) => void;
|
|
496
|
-
type UnhandledRejectionListener = (reason:
|
|
507
|
+
type UnhandledRejectionListener = (reason: any, promise: Promise<any>) => void;
|
|
497
508
|
type WarningListener = (warning: Error) => void;
|
|
498
509
|
type MessageListener = (message: any, sendHandle: any) => void;
|
|
499
|
-
type SignalsListener = () => void;
|
|
510
|
+
type SignalsListener = (signal: Signals) => void;
|
|
500
511
|
type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
|
|
501
512
|
type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
|
|
502
513
|
|
|
@@ -510,10 +521,11 @@ declare namespace NodeJS {
|
|
|
510
521
|
|
|
511
522
|
export interface WriteStream extends Socket {
|
|
512
523
|
readonly writableHighWaterMark: number;
|
|
524
|
+
readonly writableLength: number;
|
|
513
525
|
columns?: number;
|
|
514
526
|
rows?: number;
|
|
515
527
|
_write(chunk: any, encoding: string, callback: Function): void;
|
|
516
|
-
_destroy(err: Error
|
|
528
|
+
_destroy(err: Error, callback: Function): void;
|
|
517
529
|
_final(callback: Function): void;
|
|
518
530
|
setDefaultEncoding(encoding: string): this;
|
|
519
531
|
cork(): void;
|
|
@@ -522,10 +534,11 @@ declare namespace NodeJS {
|
|
|
522
534
|
}
|
|
523
535
|
export interface ReadStream extends Socket {
|
|
524
536
|
readonly readableHighWaterMark: number;
|
|
537
|
+
readonly readableLength: number;
|
|
525
538
|
isRaw?: boolean;
|
|
526
539
|
setRawMode?(mode: boolean): void;
|
|
527
540
|
_read(size: number): void;
|
|
528
|
-
_destroy(err: Error
|
|
541
|
+
_destroy(err: Error, callback: Function): void;
|
|
529
542
|
push(chunk: any, encoding?: string): boolean;
|
|
530
543
|
destroy(error?: Error): void;
|
|
531
544
|
}
|
|
@@ -542,7 +555,6 @@ declare namespace NodeJS {
|
|
|
542
555
|
abort(): void;
|
|
543
556
|
chdir(directory: string): void;
|
|
544
557
|
cwd(): string;
|
|
545
|
-
debugPort: number;
|
|
546
558
|
emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
|
|
547
559
|
env: ProcessEnv;
|
|
548
560
|
exit(code?: number): never;
|
|
@@ -557,6 +569,8 @@ declare namespace NodeJS {
|
|
|
557
569
|
setegid(id: number | string): void;
|
|
558
570
|
getgroups(): number[];
|
|
559
571
|
setgroups(groups: Array<string | number>): void;
|
|
572
|
+
setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
|
|
573
|
+
hasUncaughtExceptionCaptureCallback(): boolean;
|
|
560
574
|
version: string;
|
|
561
575
|
versions: ProcessVersions;
|
|
562
576
|
config: {
|
|
@@ -587,6 +601,7 @@ declare namespace NodeJS {
|
|
|
587
601
|
};
|
|
588
602
|
kill(pid: number, signal?: string | number): void;
|
|
589
603
|
pid: number;
|
|
604
|
+
ppid: number;
|
|
590
605
|
title: string;
|
|
591
606
|
arch: string;
|
|
592
607
|
platform: Platform;
|
|
@@ -594,7 +609,6 @@ declare namespace NodeJS {
|
|
|
594
609
|
memoryUsage(): MemoryUsage;
|
|
595
610
|
cpuUsage(previousValue?: CpuUsage): CpuUsage;
|
|
596
611
|
nextTick(callback: Function, ...args: any[]): void;
|
|
597
|
-
release: ProcessRelease;
|
|
598
612
|
umask(mask?: number): number;
|
|
599
613
|
uptime(): number;
|
|
600
614
|
hrtime(time?: [number, number]): [number, number];
|
|
@@ -795,6 +809,8 @@ declare namespace NodeJS {
|
|
|
795
809
|
}
|
|
796
810
|
}
|
|
797
811
|
|
|
812
|
+
interface IterableIterator<T> { }
|
|
813
|
+
|
|
798
814
|
/**
|
|
799
815
|
* @deprecated
|
|
800
816
|
*/
|
|
@@ -863,8 +879,6 @@ declare module "buffer" {
|
|
|
863
879
|
export var INSPECT_MAX_BYTES: number;
|
|
864
880
|
var BuffType: typeof Buffer;
|
|
865
881
|
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
882
|
export { BuffType as Buffer, SlowBuffType as SlowBuffer };
|
|
869
883
|
}
|
|
870
884
|
|
|
@@ -878,7 +892,7 @@ declare module "querystring" {
|
|
|
878
892
|
decodeURIComponent?: Function;
|
|
879
893
|
}
|
|
880
894
|
|
|
881
|
-
interface ParsedUrlQuery { [key: string]: string | string[]
|
|
895
|
+
interface ParsedUrlQuery { [key: string]: string | string[]; }
|
|
882
896
|
|
|
883
897
|
export function stringify<T>(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string;
|
|
884
898
|
export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
|
|
@@ -905,6 +919,7 @@ declare module "events" {
|
|
|
905
919
|
setMaxListeners(n: number): this;
|
|
906
920
|
getMaxListeners(): number;
|
|
907
921
|
listeners(event: string | symbol): Function[];
|
|
922
|
+
rawListeners(event: string | symbol): Function[];
|
|
908
923
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
909
924
|
eventNames(): Array<string | symbol>;
|
|
910
925
|
listenerCount(type: string | symbol): number;
|
|
@@ -923,18 +938,17 @@ declare module "http" {
|
|
|
923
938
|
// incoming headers will never contain number
|
|
924
939
|
export interface IncomingHttpHeaders {
|
|
925
940
|
'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
941
|
'access-control-allow-origin'?: string;
|
|
942
|
+
'access-control-allow-credentials'?: string;
|
|
932
943
|
'access-control-expose-headers'?: string;
|
|
933
944
|
'access-control-max-age'?: string;
|
|
945
|
+
'access-control-allow-methods'?: string;
|
|
946
|
+
'access-control-allow-headers'?: string;
|
|
947
|
+
'accept-patch'?: string;
|
|
948
|
+
'accept-ranges'?: string;
|
|
934
949
|
'age'?: string;
|
|
935
950
|
'allow'?: string;
|
|
936
951
|
'alt-svc'?: string;
|
|
937
|
-
'authorization'?: string;
|
|
938
952
|
'cache-control'?: string;
|
|
939
953
|
'connection'?: string;
|
|
940
954
|
'content-disposition'?: string;
|
|
@@ -955,11 +969,10 @@ declare module "http" {
|
|
|
955
969
|
'retry-after'?: string;
|
|
956
970
|
'set-cookie'?: string[];
|
|
957
971
|
'strict-transport-security'?: string;
|
|
958
|
-
'tk'?: string;
|
|
959
972
|
'trailer'?: string;
|
|
960
973
|
'transfer-encoding'?: string;
|
|
974
|
+
'tk'?: string;
|
|
961
975
|
'upgrade'?: string;
|
|
962
|
-
'user-agent'?: string;
|
|
963
976
|
'vary'?: string;
|
|
964
977
|
'via'?: string;
|
|
965
978
|
'warning'?: string;
|
|
@@ -1057,7 +1070,6 @@ declare module "http" {
|
|
|
1057
1070
|
|
|
1058
1071
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
1059
1072
|
|
|
1060
|
-
readonly path: string;
|
|
1061
1073
|
abort(): void;
|
|
1062
1074
|
onSocket(socket: net.Socket): void;
|
|
1063
1075
|
setTimeout(timeout: number, callback?: () => void): this;
|
|
@@ -1123,7 +1135,6 @@ declare module "http" {
|
|
|
1123
1135
|
}
|
|
1124
1136
|
|
|
1125
1137
|
export class Agent {
|
|
1126
|
-
maxFreeSockets: number;
|
|
1127
1138
|
maxSockets: number;
|
|
1128
1139
|
sockets: any;
|
|
1129
1140
|
requests: any;
|
|
@@ -1183,7 +1194,6 @@ declare module "cluster" {
|
|
|
1183
1194
|
export class Worker extends events.EventEmitter {
|
|
1184
1195
|
id: number;
|
|
1185
1196
|
process: child.ChildProcess;
|
|
1186
|
-
/** @deprecated since v6.0.0 - use `worker.exitedAfterDisconnect` instead. */
|
|
1187
1197
|
suicide: boolean;
|
|
1188
1198
|
send(message: any, sendHandle?: any, callback?: (error: Error) => void): boolean;
|
|
1189
1199
|
kill(signal?: string): void;
|
|
@@ -1460,7 +1470,7 @@ declare module "zlib" {
|
|
|
1460
1470
|
export function createInflateRaw(options?: ZlibOptions): InflateRaw;
|
|
1461
1471
|
export function createUnzip(options?: ZlibOptions): Unzip;
|
|
1462
1472
|
|
|
1463
|
-
type InputType = string | Buffer | DataView /* | TypedArray */;
|
|
1473
|
+
type InputType = string | Buffer | DataView | ArrayBuffer /* | TypedArray */;
|
|
1464
1474
|
export function deflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1465
1475
|
export function deflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
1466
1476
|
export function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
@@ -1573,7 +1583,6 @@ declare module "os" {
|
|
|
1573
1583
|
netmask: string;
|
|
1574
1584
|
mac: string;
|
|
1575
1585
|
internal: boolean;
|
|
1576
|
-
cidr: string | null;
|
|
1577
1586
|
}
|
|
1578
1587
|
|
|
1579
1588
|
export interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
|
|
@@ -1600,7 +1609,6 @@ declare module "os" {
|
|
|
1600
1609
|
export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string };
|
|
1601
1610
|
export var constants: {
|
|
1602
1611
|
UV_UDP_REUSEADDR: number,
|
|
1603
|
-
// signals: { [key in NodeJS.Signals]: number; }; @todo: change after migration to typescript 2.1
|
|
1604
1612
|
signals: {
|
|
1605
1613
|
SIGHUP: number;
|
|
1606
1614
|
SIGINT: number;
|
|
@@ -1623,7 +1631,6 @@ declare module "os" {
|
|
|
1623
1631
|
SIGCONT: number;
|
|
1624
1632
|
SIGSTOP: number;
|
|
1625
1633
|
SIGTSTP: number;
|
|
1626
|
-
SIGBREAK: number;
|
|
1627
1634
|
SIGTTIN: number;
|
|
1628
1635
|
SIGTTOU: number;
|
|
1629
1636
|
SIGURG: number;
|
|
@@ -1634,9 +1641,7 @@ declare module "os" {
|
|
|
1634
1641
|
SIGWINCH: number;
|
|
1635
1642
|
SIGIO: number;
|
|
1636
1643
|
SIGPOLL: number;
|
|
1637
|
-
SIGLOST: number;
|
|
1638
1644
|
SIGPWR: number;
|
|
1639
|
-
SIGINFO: number;
|
|
1640
1645
|
SIGSYS: number;
|
|
1641
1646
|
SIGUNUSED: number;
|
|
1642
1647
|
},
|
|
@@ -1735,20 +1740,33 @@ declare module "https" {
|
|
|
1735
1740
|
import * as http from "http";
|
|
1736
1741
|
import { URL } from "url";
|
|
1737
1742
|
|
|
1738
|
-
export
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1743
|
+
export interface ServerOptions {
|
|
1744
|
+
pfx?: any;
|
|
1745
|
+
key?: any;
|
|
1746
|
+
passphrase?: string;
|
|
1747
|
+
cert?: any;
|
|
1748
|
+
ca?: any;
|
|
1749
|
+
crl?: any;
|
|
1750
|
+
ciphers?: string;
|
|
1751
|
+
honorCipherOrder?: boolean;
|
|
1752
|
+
requestCert?: boolean;
|
|
1753
|
+
rejectUnauthorized?: boolean;
|
|
1754
|
+
NPNProtocols?: any;
|
|
1755
|
+
SNICallback?: (servername: string, cb: (err: Error | null, ctx: tls.SecureContext) => void) => void;
|
|
1756
|
+
secureProtocol?: string;
|
|
1757
|
+
}
|
|
1750
1758
|
|
|
1751
|
-
export
|
|
1759
|
+
export interface RequestOptions extends http.RequestOptions {
|
|
1760
|
+
pfx?: any;
|
|
1761
|
+
key?: any;
|
|
1762
|
+
passphrase?: string;
|
|
1763
|
+
cert?: any;
|
|
1764
|
+
ca?: any;
|
|
1765
|
+
ciphers?: string;
|
|
1766
|
+
rejectUnauthorized?: boolean;
|
|
1767
|
+
secureProtocol?: string;
|
|
1768
|
+
servername?: string;
|
|
1769
|
+
}
|
|
1752
1770
|
|
|
1753
1771
|
export interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
|
|
1754
1772
|
rejectUnauthorized?: boolean;
|
|
@@ -1757,7 +1775,6 @@ declare module "https" {
|
|
|
1757
1775
|
|
|
1758
1776
|
export class Agent extends http.Agent {
|
|
1759
1777
|
constructor(options?: AgentOptions);
|
|
1760
|
-
options: AgentOptions;
|
|
1761
1778
|
}
|
|
1762
1779
|
|
|
1763
1780
|
export class Server extends tls.Server {
|
|
@@ -1951,9 +1968,6 @@ declare module "readline" {
|
|
|
1951
1968
|
completer?: Completer | AsyncCompleter;
|
|
1952
1969
|
terminal?: boolean;
|
|
1953
1970
|
historySize?: number;
|
|
1954
|
-
prompt?: string;
|
|
1955
|
-
crlfDelay?: number;
|
|
1956
|
-
removeHistoryDuplicates?: boolean;
|
|
1957
1971
|
}
|
|
1958
1972
|
|
|
1959
1973
|
export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine;
|
|
@@ -1992,26 +2006,24 @@ declare module "vm" {
|
|
|
1992
2006
|
}
|
|
1993
2007
|
export function createContext(sandbox?: Context): Context;
|
|
1994
2008
|
export function isContext(sandbox: Context): boolean;
|
|
1995
|
-
export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions
|
|
2009
|
+
export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any;
|
|
1996
2010
|
export function runInDebugContext(code: string): any;
|
|
1997
|
-
export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions
|
|
1998
|
-
export function runInThisContext(code: string, options?: RunningScriptOptions
|
|
2011
|
+
export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any;
|
|
2012
|
+
export function runInThisContext(code: string, options?: RunningScriptOptions): any;
|
|
1999
2013
|
}
|
|
2000
2014
|
|
|
2001
2015
|
declare module "child_process" {
|
|
2002
2016
|
import * as events from "events";
|
|
2003
2017
|
import * as stream from "stream";
|
|
2004
2018
|
import * as net from "net";
|
|
2019
|
+
|
|
2005
2020
|
export interface ChildProcess extends events.EventEmitter {
|
|
2006
2021
|
stdin: stream.Writable;
|
|
2007
2022
|
stdout: stream.Readable;
|
|
2008
2023
|
stderr: stream.Readable;
|
|
2009
|
-
|
|
2010
|
-
stdio: StdioStreams;
|
|
2024
|
+
stdio: [stream.Writable, stream.Readable, stream.Readable];
|
|
2011
2025
|
killed: boolean;
|
|
2012
2026
|
pid: number;
|
|
2013
|
-
readonly exitCode: number | null;
|
|
2014
|
-
readonly signalCode: number | null;
|
|
2015
2027
|
kill(signal?: string): void;
|
|
2016
2028
|
send(message: any, callback?: (error: Error) => void): boolean;
|
|
2017
2029
|
send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error) => void): boolean;
|
|
@@ -2073,12 +2085,6 @@ declare module "child_process" {
|
|
|
2073
2085
|
prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
|
|
2074
2086
|
}
|
|
2075
2087
|
|
|
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
2088
|
export interface MessageOptions {
|
|
2083
2089
|
keepOpen?: boolean;
|
|
2084
2090
|
}
|
|
@@ -2092,10 +2098,9 @@ declare module "child_process" {
|
|
|
2092
2098
|
gid?: number;
|
|
2093
2099
|
shell?: boolean | string;
|
|
2094
2100
|
windowsVerbatimArguments?: boolean;
|
|
2095
|
-
windowsHide?: boolean;
|
|
2096
2101
|
}
|
|
2097
2102
|
|
|
2098
|
-
export function spawn(command: string, args?:
|
|
2103
|
+
export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess;
|
|
2099
2104
|
|
|
2100
2105
|
export interface ExecOptions {
|
|
2101
2106
|
cwd?: string;
|
|
@@ -2106,7 +2111,6 @@ declare module "child_process" {
|
|
|
2106
2111
|
killSignal?: string;
|
|
2107
2112
|
uid?: number;
|
|
2108
2113
|
gid?: number;
|
|
2109
|
-
windowsHide?: boolean;
|
|
2110
2114
|
}
|
|
2111
2115
|
|
|
2112
2116
|
export interface ExecOptionsWithStringEncoding extends ExecOptions {
|
|
@@ -2153,9 +2157,7 @@ declare module "child_process" {
|
|
|
2153
2157
|
killSignal?: string;
|
|
2154
2158
|
uid?: number;
|
|
2155
2159
|
gid?: number;
|
|
2156
|
-
windowsHide?: boolean;
|
|
2157
2160
|
windowsVerbatimArguments?: boolean;
|
|
2158
|
-
shell?: boolean | string;
|
|
2159
2161
|
}
|
|
2160
2162
|
export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
|
|
2161
2163
|
encoding: BufferEncoding;
|
|
@@ -2220,12 +2222,10 @@ declare module "child_process" {
|
|
|
2220
2222
|
execArgv?: string[];
|
|
2221
2223
|
silent?: boolean;
|
|
2222
2224
|
stdio?: any[];
|
|
2223
|
-
detached?: boolean;
|
|
2224
2225
|
uid?: number;
|
|
2225
2226
|
gid?: number;
|
|
2226
2227
|
windowsVerbatimArguments?: boolean;
|
|
2227
2228
|
}
|
|
2228
|
-
export function fork(modulePath: string, options?: ForkOptions): ChildProcess;
|
|
2229
2229
|
export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess;
|
|
2230
2230
|
|
|
2231
2231
|
export interface SpawnSyncOptions {
|
|
@@ -2240,7 +2240,6 @@ declare module "child_process" {
|
|
|
2240
2240
|
maxBuffer?: number;
|
|
2241
2241
|
encoding?: string;
|
|
2242
2242
|
shell?: boolean | string;
|
|
2243
|
-
windowsHide?: boolean;
|
|
2244
2243
|
windowsVerbatimArguments?: boolean;
|
|
2245
2244
|
}
|
|
2246
2245
|
export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
|
|
@@ -2256,7 +2255,7 @@ declare module "child_process" {
|
|
|
2256
2255
|
stderr: T;
|
|
2257
2256
|
status: number;
|
|
2258
2257
|
signal: string;
|
|
2259
|
-
error
|
|
2258
|
+
error: Error;
|
|
2260
2259
|
}
|
|
2261
2260
|
export function spawnSync(command: string): SpawnSyncReturns<Buffer>;
|
|
2262
2261
|
export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
@@ -2278,7 +2277,6 @@ declare module "child_process" {
|
|
|
2278
2277
|
killSignal?: string;
|
|
2279
2278
|
maxBuffer?: number;
|
|
2280
2279
|
encoding?: string;
|
|
2281
|
-
windowsHide?: boolean;
|
|
2282
2280
|
}
|
|
2283
2281
|
export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
|
|
2284
2282
|
encoding: BufferEncoding;
|
|
@@ -2302,7 +2300,6 @@ declare module "child_process" {
|
|
|
2302
2300
|
killSignal?: string;
|
|
2303
2301
|
maxBuffer?: number;
|
|
2304
2302
|
encoding?: string;
|
|
2305
|
-
windowsHide?: boolean;
|
|
2306
2303
|
}
|
|
2307
2304
|
export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
|
|
2308
2305
|
encoding: BufferEncoding;
|
|
@@ -2364,9 +2361,6 @@ declare module "url" {
|
|
|
2364
2361
|
export function format(urlObject: UrlObject | string): string;
|
|
2365
2362
|
export function resolve(from: string, to: string): string;
|
|
2366
2363
|
|
|
2367
|
-
export function domainToASCII(domain: string): string;
|
|
2368
|
-
export function domainToUnicode(domain: string): string;
|
|
2369
|
-
|
|
2370
2364
|
export interface URLFormatOptions {
|
|
2371
2365
|
auth?: boolean;
|
|
2372
2366
|
fragment?: boolean;
|
|
@@ -2379,7 +2373,7 @@ declare module "url" {
|
|
|
2379
2373
|
append(name: string, value: string): void;
|
|
2380
2374
|
delete(name: string): void;
|
|
2381
2375
|
entries(): IterableIterator<[string, string]>;
|
|
2382
|
-
forEach(callback: (value: string, name: string
|
|
2376
|
+
forEach(callback: (value: string, name: string) => void): void;
|
|
2383
2377
|
get(name: string): string | null;
|
|
2384
2378
|
getAll(name: string): string[];
|
|
2385
2379
|
has(name: string): boolean;
|
|
@@ -2419,7 +2413,6 @@ declare module "dns" {
|
|
|
2419
2413
|
family?: number;
|
|
2420
2414
|
hints?: number;
|
|
2421
2415
|
all?: boolean;
|
|
2422
|
-
verbatim?: boolean;
|
|
2423
2416
|
}
|
|
2424
2417
|
|
|
2425
2418
|
export interface LookupOneOptions extends LookupOptions {
|
|
@@ -2435,11 +2428,11 @@ declare module "dns" {
|
|
|
2435
2428
|
family: number;
|
|
2436
2429
|
}
|
|
2437
2430
|
|
|
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
|
|
2431
|
+
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2432
|
+
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2433
|
+
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
|
2434
|
+
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
|
2435
|
+
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2443
2436
|
|
|
2444
2437
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2445
2438
|
export namespace lookup {
|
|
@@ -2448,12 +2441,6 @@ declare module "dns" {
|
|
|
2448
2441
|
export function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>;
|
|
2449
2442
|
}
|
|
2450
2443
|
|
|
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
2444
|
export interface ResolveOptions {
|
|
2458
2445
|
ttl: boolean;
|
|
2459
2446
|
}
|
|
@@ -2467,23 +2454,11 @@ declare module "dns" {
|
|
|
2467
2454
|
ttl: number;
|
|
2468
2455
|
}
|
|
2469
2456
|
|
|
2470
|
-
export interface AnyARecord extends RecordWithTtl {
|
|
2471
|
-
type: "A";
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
export interface AnyAaaaRecord extends RecordWithTtl {
|
|
2475
|
-
type: "AAAA";
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
2457
|
export interface MxRecord {
|
|
2479
2458
|
priority: number;
|
|
2480
2459
|
exchange: string;
|
|
2481
2460
|
}
|
|
2482
2461
|
|
|
2483
|
-
export interface AnyMxRecord extends MxRecord {
|
|
2484
|
-
type: "MX";
|
|
2485
|
-
}
|
|
2486
|
-
|
|
2487
2462
|
export interface NaptrRecord {
|
|
2488
2463
|
flags: string;
|
|
2489
2464
|
service: string;
|
|
@@ -2493,10 +2468,6 @@ declare module "dns" {
|
|
|
2493
2468
|
preference: number;
|
|
2494
2469
|
}
|
|
2495
2470
|
|
|
2496
|
-
export interface AnyNaptrRecord extends NaptrRecord {
|
|
2497
|
-
type: "NAPTR";
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
2471
|
export interface SoaRecord {
|
|
2501
2472
|
nsname: string;
|
|
2502
2473
|
hostmaster: string;
|
|
@@ -2507,10 +2478,6 @@ declare module "dns" {
|
|
|
2507
2478
|
minttl: number;
|
|
2508
2479
|
}
|
|
2509
2480
|
|
|
2510
|
-
export interface AnySoaRecord extends SoaRecord {
|
|
2511
|
-
type: "SOA";
|
|
2512
|
-
}
|
|
2513
|
-
|
|
2514
2481
|
export interface SrvRecord {
|
|
2515
2482
|
priority: number;
|
|
2516
2483
|
weight: number;
|
|
@@ -2518,70 +2485,33 @@ declare module "dns" {
|
|
|
2518
2485
|
name: string;
|
|
2519
2486
|
}
|
|
2520
2487
|
|
|
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;
|
|
2488
|
+
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2489
|
+
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2490
|
+
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2491
|
+
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2492
|
+
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2493
|
+
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
2494
|
+
export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2495
|
+
export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2496
|
+
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
|
2497
|
+
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2498
|
+
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2499
|
+
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
|
2569
2500
|
|
|
2570
2501
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2571
2502
|
export namespace resolve {
|
|
2572
2503
|
export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
2573
|
-
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
2574
2504
|
export function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
2575
2505
|
export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
2576
2506
|
export function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
2577
2507
|
export function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
2578
2508
|
export function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
2579
|
-
export function __promisify__(hostname: string, rrtype
|
|
2509
|
+
export function __promisify__(hostname: string, rrtype?: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]>;
|
|
2580
2510
|
}
|
|
2581
2511
|
|
|
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
|
|
2512
|
+
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2513
|
+
export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
2514
|
+
export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2585
2515
|
|
|
2586
2516
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2587
2517
|
export namespace resolve4 {
|
|
@@ -2590,9 +2520,9 @@ declare module "dns" {
|
|
|
2590
2520
|
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
2591
2521
|
}
|
|
2592
2522
|
|
|
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
|
|
2523
|
+
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2524
|
+
export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
2525
|
+
export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2596
2526
|
|
|
2597
2527
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2598
2528
|
export namespace resolve6 {
|
|
@@ -2601,54 +2531,17 @@ declare module "dns" {
|
|
|
2601
2531
|
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
2602
2532
|
}
|
|
2603
2533
|
|
|
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
|
-
}
|
|
2534
|
+
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2535
|
+
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2536
|
+
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
2537
|
+
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2538
|
+
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2539
|
+
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
|
2540
|
+
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2541
|
+
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2648
2542
|
|
|
2649
|
-
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException
|
|
2543
|
+
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
|
2650
2544
|
export function setServers(servers: string[]): void;
|
|
2651
|
-
export function getServers(): string[];
|
|
2652
2545
|
|
|
2653
2546
|
// Error codes
|
|
2654
2547
|
export var NODATA: string;
|
|
@@ -2675,25 +2568,6 @@ declare module "dns" {
|
|
|
2675
2568
|
export var LOADIPHLPAPI: string;
|
|
2676
2569
|
export var ADDRGETNETWORKPARAMS: string;
|
|
2677
2570
|
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
2571
|
}
|
|
2698
2572
|
|
|
2699
2573
|
declare module "net" {
|
|
@@ -2747,9 +2621,9 @@ declare module "net" {
|
|
|
2747
2621
|
destroy(err?: any): void;
|
|
2748
2622
|
pause(): this;
|
|
2749
2623
|
resume(): this;
|
|
2750
|
-
setTimeout(timeout: number, callback?: Function):
|
|
2751
|
-
setNoDelay(noDelay?: boolean):
|
|
2752
|
-
setKeepAlive(enable?: boolean, initialDelay?: number):
|
|
2624
|
+
setTimeout(timeout: number, callback?: Function): void;
|
|
2625
|
+
setNoDelay(noDelay?: boolean): void;
|
|
2626
|
+
setKeepAlive(enable?: boolean, initialDelay?: number): void;
|
|
2753
2627
|
address(): { port: number; family: string; address: string; };
|
|
2754
2628
|
unref(): void;
|
|
2755
2629
|
ref(): void;
|
|
@@ -2865,7 +2739,7 @@ declare module "net" {
|
|
|
2865
2739
|
listen(options: ListenOptions, listeningListener?: Function): this;
|
|
2866
2740
|
listen(handle: any, backlog?: number, listeningListener?: Function): this;
|
|
2867
2741
|
listen(handle: any, listeningListener?: Function): this;
|
|
2868
|
-
close(callback?:
|
|
2742
|
+
close(callback?: Function): this;
|
|
2869
2743
|
address(): { port: number; family: string; address: string; };
|
|
2870
2744
|
getConnections(cb: (error: Error | null, count: number) => void): void;
|
|
2871
2745
|
ref(): this;
|
|
@@ -2970,15 +2844,15 @@ declare module "dgram" {
|
|
|
2970
2844
|
reuseAddr?: boolean;
|
|
2971
2845
|
recvBufferSize?: number;
|
|
2972
2846
|
sendBufferSize?: number;
|
|
2973
|
-
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException
|
|
2847
|
+
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void) => void;
|
|
2974
2848
|
}
|
|
2975
2849
|
|
|
2976
2850
|
export function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
|
2977
2851
|
export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
|
2978
2852
|
|
|
2979
2853
|
export class Socket extends events.EventEmitter {
|
|
2980
|
-
send(msg: Buffer |
|
|
2981
|
-
send(msg: Buffer |
|
|
2854
|
+
send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
2855
|
+
send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
2982
2856
|
bind(port?: number, address?: string, callback?: () => void): void;
|
|
2983
2857
|
bind(port?: number, callback?: () => void): void;
|
|
2984
2858
|
bind(callback?: () => void): void;
|
|
@@ -3181,7 +3055,7 @@ declare module "fs" {
|
|
|
3181
3055
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3182
3056
|
* URL support is _experimental_.
|
|
3183
3057
|
*/
|
|
3184
|
-
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3058
|
+
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3185
3059
|
|
|
3186
3060
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3187
3061
|
export namespace rename {
|
|
@@ -3209,14 +3083,14 @@ declare module "fs" {
|
|
|
3209
3083
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3210
3084
|
* @param len If not specified, defaults to `0`.
|
|
3211
3085
|
*/
|
|
3212
|
-
export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3086
|
+
export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3213
3087
|
|
|
3214
3088
|
/**
|
|
3215
3089
|
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
3216
3090
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3217
3091
|
* URL support is _experimental_.
|
|
3218
3092
|
*/
|
|
3219
|
-
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3093
|
+
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3220
3094
|
|
|
3221
3095
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3222
3096
|
export namespace truncate {
|
|
@@ -3240,13 +3114,13 @@ declare module "fs" {
|
|
|
3240
3114
|
* @param fd A file descriptor.
|
|
3241
3115
|
* @param len If not specified, defaults to `0`.
|
|
3242
3116
|
*/
|
|
3243
|
-
export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3117
|
+
export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3244
3118
|
|
|
3245
3119
|
/**
|
|
3246
3120
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
3247
3121
|
* @param fd A file descriptor.
|
|
3248
3122
|
*/
|
|
3249
|
-
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3123
|
+
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3250
3124
|
|
|
3251
3125
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3252
3126
|
export namespace ftruncate {
|
|
@@ -3269,7 +3143,7 @@ declare module "fs" {
|
|
|
3269
3143
|
* Asynchronous chown(2) - Change ownership of a file.
|
|
3270
3144
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3271
3145
|
*/
|
|
3272
|
-
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException
|
|
3146
|
+
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3273
3147
|
|
|
3274
3148
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3275
3149
|
export namespace chown {
|
|
@@ -3290,7 +3164,7 @@ declare module "fs" {
|
|
|
3290
3164
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
3291
3165
|
* @param fd A file descriptor.
|
|
3292
3166
|
*/
|
|
3293
|
-
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException
|
|
3167
|
+
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3294
3168
|
|
|
3295
3169
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3296
3170
|
export namespace fchown {
|
|
@@ -3311,7 +3185,7 @@ declare module "fs" {
|
|
|
3311
3185
|
* Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
|
|
3312
3186
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3313
3187
|
*/
|
|
3314
|
-
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException
|
|
3188
|
+
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3315
3189
|
|
|
3316
3190
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3317
3191
|
export namespace lchown {
|
|
@@ -3333,7 +3207,7 @@ declare module "fs" {
|
|
|
3333
3207
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3334
3208
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3335
3209
|
*/
|
|
3336
|
-
export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException
|
|
3210
|
+
export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3337
3211
|
|
|
3338
3212
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3339
3213
|
export namespace chmod {
|
|
@@ -3357,7 +3231,7 @@ declare module "fs" {
|
|
|
3357
3231
|
* @param fd A file descriptor.
|
|
3358
3232
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3359
3233
|
*/
|
|
3360
|
-
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException
|
|
3234
|
+
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3361
3235
|
|
|
3362
3236
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3363
3237
|
export namespace fchmod {
|
|
@@ -3381,7 +3255,7 @@ declare module "fs" {
|
|
|
3381
3255
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3382
3256
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3383
3257
|
*/
|
|
3384
|
-
export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException
|
|
3258
|
+
export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3385
3259
|
|
|
3386
3260
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3387
3261
|
export namespace lchmod {
|
|
@@ -3404,7 +3278,7 @@ declare module "fs" {
|
|
|
3404
3278
|
* Asynchronous stat(2) - Get file status.
|
|
3405
3279
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3406
3280
|
*/
|
|
3407
|
-
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3281
|
+
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3408
3282
|
|
|
3409
3283
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3410
3284
|
export namespace stat {
|
|
@@ -3425,7 +3299,7 @@ declare module "fs" {
|
|
|
3425
3299
|
* Asynchronous fstat(2) - Get file status.
|
|
3426
3300
|
* @param fd A file descriptor.
|
|
3427
3301
|
*/
|
|
3428
|
-
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3302
|
+
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3429
3303
|
|
|
3430
3304
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3431
3305
|
export namespace fstat {
|
|
@@ -3446,7 +3320,7 @@ declare module "fs" {
|
|
|
3446
3320
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
3447
3321
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3448
3322
|
*/
|
|
3449
|
-
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3323
|
+
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3450
3324
|
|
|
3451
3325
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3452
3326
|
export namespace lstat {
|
|
@@ -3468,7 +3342,7 @@ declare module "fs" {
|
|
|
3468
3342
|
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3469
3343
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3470
3344
|
*/
|
|
3471
|
-
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3345
|
+
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3472
3346
|
|
|
3473
3347
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3474
3348
|
export namespace link {
|
|
@@ -3477,7 +3351,7 @@ declare module "fs" {
|
|
|
3477
3351
|
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3478
3352
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3479
3353
|
*/
|
|
3480
|
-
export function
|
|
3354
|
+
export function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
|
3481
3355
|
}
|
|
3482
3356
|
|
|
3483
3357
|
/**
|
|
@@ -3494,14 +3368,14 @@ declare module "fs" {
|
|
|
3494
3368
|
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
|
3495
3369
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
3496
3370
|
*/
|
|
3497
|
-
export function symlink(target: PathLike, path: PathLike, type:
|
|
3371
|
+
export function symlink(target: PathLike, path: PathLike, type: string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3498
3372
|
|
|
3499
3373
|
/**
|
|
3500
3374
|
* Asynchronous symlink(2) - Create a new symbolic link to an existing file.
|
|
3501
3375
|
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
3502
3376
|
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
|
3503
3377
|
*/
|
|
3504
|
-
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3378
|
+
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3505
3379
|
|
|
3506
3380
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3507
3381
|
export namespace symlink {
|
|
@@ -3513,8 +3387,6 @@ declare module "fs" {
|
|
|
3513
3387
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
3514
3388
|
*/
|
|
3515
3389
|
export function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
|
|
3516
|
-
|
|
3517
|
-
export type Type = "dir" | "file" | "junction";
|
|
3518
3390
|
}
|
|
3519
3391
|
|
|
3520
3392
|
/**
|
|
@@ -3524,34 +3396,34 @@ declare module "fs" {
|
|
|
3524
3396
|
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
|
3525
3397
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
3526
3398
|
*/
|
|
3527
|
-
export function symlinkSync(target: PathLike, path: PathLike, type?:
|
|
3399
|
+
export function symlinkSync(target: PathLike, path: PathLike, type?: string | null): void;
|
|
3528
3400
|
|
|
3529
3401
|
/**
|
|
3530
3402
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3531
3403
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3532
3404
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3533
3405
|
*/
|
|
3534
|
-
export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3406
|
+
export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
|
|
3535
3407
|
|
|
3536
3408
|
/**
|
|
3537
3409
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3538
3410
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3539
3411
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3540
3412
|
*/
|
|
3541
|
-
export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException
|
|
3413
|
+
export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, linkString: Buffer) => void): void;
|
|
3542
3414
|
|
|
3543
3415
|
/**
|
|
3544
3416
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3545
3417
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3546
3418
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3547
3419
|
*/
|
|
3548
|
-
export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3420
|
+
export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string | Buffer) => void): void;
|
|
3549
3421
|
|
|
3550
3422
|
/**
|
|
3551
3423
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3552
3424
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3553
3425
|
*/
|
|
3554
|
-
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3426
|
+
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
|
|
3555
3427
|
|
|
3556
3428
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3557
3429
|
export namespace readlink {
|
|
@@ -3603,27 +3475,27 @@ declare module "fs" {
|
|
|
3603
3475
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3604
3476
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3605
3477
|
*/
|
|
3606
|
-
export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3478
|
+
export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3607
3479
|
|
|
3608
3480
|
/**
|
|
3609
3481
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3610
3482
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3611
3483
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3612
3484
|
*/
|
|
3613
|
-
export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException
|
|
3485
|
+
export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void;
|
|
3614
3486
|
|
|
3615
3487
|
/**
|
|
3616
3488
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3617
3489
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3618
3490
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3619
3491
|
*/
|
|
3620
|
-
export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3492
|
+
export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void;
|
|
3621
3493
|
|
|
3622
3494
|
/**
|
|
3623
3495
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3624
3496
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3625
3497
|
*/
|
|
3626
|
-
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3498
|
+
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3627
3499
|
|
|
3628
3500
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3629
3501
|
export namespace realpath {
|
|
@@ -3647,6 +3519,11 @@ declare module "fs" {
|
|
|
3647
3519
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3648
3520
|
*/
|
|
3649
3521
|
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
|
|
3522
|
+
|
|
3523
|
+
export function native(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3524
|
+
export function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void;
|
|
3525
|
+
export function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void;
|
|
3526
|
+
export function native(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3650
3527
|
}
|
|
3651
3528
|
|
|
3652
3529
|
/**
|
|
@@ -3670,11 +3547,17 @@ declare module "fs" {
|
|
|
3670
3547
|
*/
|
|
3671
3548
|
export function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer;
|
|
3672
3549
|
|
|
3550
|
+
export namespace realpathSync {
|
|
3551
|
+
export function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string;
|
|
3552
|
+
export function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer;
|
|
3553
|
+
export function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer;
|
|
3554
|
+
}
|
|
3555
|
+
|
|
3673
3556
|
/**
|
|
3674
3557
|
* Asynchronous unlink(2) - delete a name and possibly the file it refers to.
|
|
3675
3558
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3676
3559
|
*/
|
|
3677
|
-
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3560
|
+
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3678
3561
|
|
|
3679
3562
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3680
3563
|
export namespace unlink {
|
|
@@ -3695,7 +3578,7 @@ declare module "fs" {
|
|
|
3695
3578
|
* Asynchronous rmdir(2) - delete a directory.
|
|
3696
3579
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3697
3580
|
*/
|
|
3698
|
-
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3581
|
+
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3699
3582
|
|
|
3700
3583
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3701
3584
|
export namespace rmdir {
|
|
@@ -3717,13 +3600,13 @@ declare module "fs" {
|
|
|
3717
3600
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3718
3601
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
3719
3602
|
*/
|
|
3720
|
-
export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3603
|
+
export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3721
3604
|
|
|
3722
3605
|
/**
|
|
3723
3606
|
* Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
|
|
3724
3607
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3725
3608
|
*/
|
|
3726
|
-
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3609
|
+
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3727
3610
|
|
|
3728
3611
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3729
3612
|
export namespace mkdir {
|
|
@@ -3747,27 +3630,27 @@ declare module "fs" {
|
|
|
3747
3630
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3748
3631
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3749
3632
|
*/
|
|
3750
|
-
export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3633
|
+
export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
3751
3634
|
|
|
3752
3635
|
/**
|
|
3753
3636
|
* Asynchronously creates a unique temporary directory.
|
|
3754
3637
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3755
3638
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3756
3639
|
*/
|
|
3757
|
-
export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException
|
|
3640
|
+
export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException, folder: Buffer) => void): void;
|
|
3758
3641
|
|
|
3759
3642
|
/**
|
|
3760
3643
|
* Asynchronously creates a unique temporary directory.
|
|
3761
3644
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3762
3645
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3763
3646
|
*/
|
|
3764
|
-
export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3647
|
+
export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string | Buffer) => void): void;
|
|
3765
3648
|
|
|
3766
3649
|
/**
|
|
3767
3650
|
* Asynchronously creates a unique temporary directory.
|
|
3768
3651
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3769
3652
|
*/
|
|
3770
|
-
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException
|
|
3653
|
+
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
3771
3654
|
|
|
3772
3655
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3773
3656
|
export namespace mkdtemp {
|
|
@@ -3819,27 +3702,27 @@ declare module "fs" {
|
|
|
3819
3702
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3820
3703
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3821
3704
|
*/
|
|
3822
|
-
export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3705
|
+
export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
3823
3706
|
|
|
3824
3707
|
/**
|
|
3825
3708
|
* Asynchronous readdir(3) - read a directory.
|
|
3826
3709
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3827
3710
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3828
3711
|
*/
|
|
3829
|
-
export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException
|
|
3712
|
+
export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, files: Buffer[]) => void): void;
|
|
3830
3713
|
|
|
3831
3714
|
/**
|
|
3832
3715
|
* Asynchronous readdir(3) - read a directory.
|
|
3833
3716
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3834
3717
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3835
3718
|
*/
|
|
3836
|
-
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3719
|
+
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: Array<string | Buffer>) => void): void;
|
|
3837
3720
|
|
|
3838
3721
|
/**
|
|
3839
3722
|
* Asynchronous readdir(3) - read a directory.
|
|
3840
3723
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3841
3724
|
*/
|
|
3842
|
-
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
3725
|
+
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
3843
3726
|
|
|
3844
3727
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3845
3728
|
export namespace readdir {
|
|
@@ -3862,7 +3745,7 @@ declare module "fs" {
|
|
|
3862
3745
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3863
3746
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3864
3747
|
*/
|
|
3865
|
-
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string
|
|
3748
|
+
export function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<Array<string | Buffer>>;
|
|
3866
3749
|
}
|
|
3867
3750
|
|
|
3868
3751
|
/**
|
|
@@ -3884,13 +3767,13 @@ declare module "fs" {
|
|
|
3884
3767
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3885
3768
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3886
3769
|
*/
|
|
3887
|
-
export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): string
|
|
3770
|
+
export function readdirSync(path: PathLike, options?: { encoding?: string | null } | string | null): Array<string | Buffer>;
|
|
3888
3771
|
|
|
3889
3772
|
/**
|
|
3890
3773
|
* Asynchronous close(2) - close a file descriptor.
|
|
3891
3774
|
* @param fd A file descriptor.
|
|
3892
3775
|
*/
|
|
3893
|
-
export function close(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3776
|
+
export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3894
3777
|
|
|
3895
3778
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3896
3779
|
export namespace close {
|
|
@@ -3912,13 +3795,13 @@ declare module "fs" {
|
|
|
3912
3795
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3913
3796
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
|
|
3914
3797
|
*/
|
|
3915
|
-
export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3798
|
+
export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
3916
3799
|
|
|
3917
3800
|
/**
|
|
3918
3801
|
* Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
|
|
3919
3802
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3920
3803
|
*/
|
|
3921
|
-
export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException
|
|
3804
|
+
export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
3922
3805
|
|
|
3923
3806
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3924
3807
|
export namespace open {
|
|
@@ -3943,7 +3826,7 @@ declare module "fs" {
|
|
|
3943
3826
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
3944
3827
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
3945
3828
|
*/
|
|
3946
|
-
export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException
|
|
3829
|
+
export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3947
3830
|
|
|
3948
3831
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3949
3832
|
export namespace utimes {
|
|
@@ -3970,7 +3853,7 @@ declare module "fs" {
|
|
|
3970
3853
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
3971
3854
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
3972
3855
|
*/
|
|
3973
|
-
export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException
|
|
3856
|
+
export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3974
3857
|
|
|
3975
3858
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3976
3859
|
export namespace futimes {
|
|
@@ -3995,7 +3878,7 @@ declare module "fs" {
|
|
|
3995
3878
|
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
3996
3879
|
* @param fd A file descriptor.
|
|
3997
3880
|
*/
|
|
3998
|
-
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException
|
|
3881
|
+
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3999
3882
|
|
|
4000
3883
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4001
3884
|
export namespace fsync {
|
|
@@ -4019,7 +3902,7 @@ declare module "fs" {
|
|
|
4019
3902
|
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4020
3903
|
* @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
3904
|
*/
|
|
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
|
|
3905
|
+
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
3906
|
|
|
4024
3907
|
/**
|
|
4025
3908
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
@@ -4027,20 +3910,20 @@ declare module "fs" {
|
|
|
4027
3910
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4028
3911
|
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4029
3912
|
*/
|
|
4030
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3913
|
+
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
3914
|
|
|
4032
3915
|
/**
|
|
4033
3916
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
4034
3917
|
* @param fd A file descriptor.
|
|
4035
3918
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4036
3919
|
*/
|
|
4037
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3920
|
+
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
3921
|
|
|
4039
3922
|
/**
|
|
4040
3923
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
4041
3924
|
* @param fd A file descriptor.
|
|
4042
3925
|
*/
|
|
4043
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException
|
|
3926
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4044
3927
|
|
|
4045
3928
|
/**
|
|
4046
3929
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
@@ -4049,7 +3932,7 @@ declare module "fs" {
|
|
|
4049
3932
|
* @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
3933
|
* @param encoding The expected string encoding.
|
|
4051
3934
|
*/
|
|
4052
|
-
export function write(fd: number, string: any, position: number | undefined | null, encoding: string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3935
|
+
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
3936
|
|
|
4054
3937
|
/**
|
|
4055
3938
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
@@ -4057,14 +3940,14 @@ declare module "fs" {
|
|
|
4057
3940
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4058
3941
|
* @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
3942
|
*/
|
|
4060
|
-
export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
3943
|
+
export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4061
3944
|
|
|
4062
3945
|
/**
|
|
4063
3946
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
4064
3947
|
* @param fd A file descriptor.
|
|
4065
3948
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4066
3949
|
*/
|
|
4067
|
-
export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException
|
|
3950
|
+
export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4068
3951
|
|
|
4069
3952
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4070
3953
|
export namespace write {
|
|
@@ -4113,7 +3996,7 @@ declare module "fs" {
|
|
|
4113
3996
|
* @param length The number of bytes to read.
|
|
4114
3997
|
* @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
3998
|
*/
|
|
4116
|
-
export function read<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException
|
|
3999
|
+
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
4000
|
|
|
4118
4001
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4119
4002
|
export namespace read {
|
|
@@ -4144,7 +4027,7 @@ declare module "fs" {
|
|
|
4144
4027
|
* @param options An object that may contain an optional flag.
|
|
4145
4028
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4146
4029
|
*/
|
|
4147
|
-
export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
4030
|
+
export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
4148
4031
|
|
|
4149
4032
|
/**
|
|
4150
4033
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -4154,7 +4037,7 @@ declare module "fs" {
|
|
|
4154
4037
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
4155
4038
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4156
4039
|
*/
|
|
4157
|
-
export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException
|
|
4040
|
+
export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
|
|
4158
4041
|
|
|
4159
4042
|
/**
|
|
4160
4043
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -4164,14 +4047,14 @@ declare module "fs" {
|
|
|
4164
4047
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
4165
4048
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4166
4049
|
*/
|
|
4167
|
-
export function readFile(path: PathLike | number, options: { encoding?: string | null; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException
|
|
4050
|
+
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
4051
|
|
|
4169
4052
|
/**
|
|
4170
4053
|
* Asynchronously reads the entire contents of a file.
|
|
4171
4054
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4172
4055
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4173
4056
|
*/
|
|
4174
|
-
export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException
|
|
4057
|
+
export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
4175
4058
|
|
|
4176
4059
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4177
4060
|
export namespace readFile {
|
|
@@ -4246,7 +4129,7 @@ declare module "fs" {
|
|
|
4246
4129
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
4247
4130
|
* If `flag` is not supplied, the default of `'w'` is used.
|
|
4248
4131
|
*/
|
|
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
|
|
4132
|
+
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
4133
|
|
|
4251
4134
|
/**
|
|
4252
4135
|
* Asynchronously writes data to a file, replacing the file if it already exists.
|
|
@@ -4255,7 +4138,7 @@ declare module "fs" {
|
|
|
4255
4138
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4256
4139
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
4257
4140
|
*/
|
|
4258
|
-
export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException
|
|
4141
|
+
export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4259
4142
|
|
|
4260
4143
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4261
4144
|
export namespace writeFile {
|
|
@@ -4300,7 +4183,7 @@ declare module "fs" {
|
|
|
4300
4183
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
4301
4184
|
* If `flag` is not supplied, the default of `'a'` is used.
|
|
4302
4185
|
*/
|
|
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
|
|
4186
|
+
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
4187
|
|
|
4305
4188
|
/**
|
|
4306
4189
|
* Asynchronously append data to a file, creating the file if it does not exist.
|
|
@@ -4309,7 +4192,7 @@ declare module "fs" {
|
|
|
4309
4192
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4310
4193
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
4311
4194
|
*/
|
|
4312
|
-
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException
|
|
4195
|
+
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4313
4196
|
|
|
4314
4197
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4315
4198
|
export namespace appendFile {
|
|
@@ -4563,14 +4446,14 @@ declare module "fs" {
|
|
|
4563
4446
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
4564
4447
|
* URL support is _experimental_.
|
|
4565
4448
|
*/
|
|
4566
|
-
export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException
|
|
4449
|
+
export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4567
4450
|
|
|
4568
4451
|
/**
|
|
4569
4452
|
* Asynchronously tests a user's permissions for the file specified by path.
|
|
4570
4453
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
4571
4454
|
* URL support is _experimental_.
|
|
4572
4455
|
*/
|
|
4573
|
-
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException
|
|
4456
|
+
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4574
4457
|
|
|
4575
4458
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4576
4459
|
export namespace access {
|
|
@@ -4617,14 +4500,13 @@ declare module "fs" {
|
|
|
4617
4500
|
mode?: number;
|
|
4618
4501
|
autoClose?: boolean;
|
|
4619
4502
|
start?: number;
|
|
4620
|
-
highWaterMark?: number;
|
|
4621
4503
|
}): WriteStream;
|
|
4622
4504
|
|
|
4623
4505
|
/**
|
|
4624
4506
|
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
4625
4507
|
* @param fd A file descriptor.
|
|
4626
4508
|
*/
|
|
4627
|
-
export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException
|
|
4509
|
+
export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4628
4510
|
|
|
4629
4511
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4630
4512
|
export namespace fdatasync {
|
|
@@ -4650,7 +4532,7 @@ declare module "fs" {
|
|
|
4650
4532
|
* @param src A path to the source file.
|
|
4651
4533
|
* @param dest A path to the destination file.
|
|
4652
4534
|
*/
|
|
4653
|
-
export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException
|
|
4535
|
+
export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4654
4536
|
/**
|
|
4655
4537
|
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
|
|
4656
4538
|
* No arguments other than a possible exception are given to the callback function.
|
|
@@ -4661,7 +4543,7 @@ declare module "fs" {
|
|
|
4661
4543
|
* @param dest A path to the destination file.
|
|
4662
4544
|
* @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
4545
|
*/
|
|
4664
|
-
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException
|
|
4546
|
+
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4665
4547
|
|
|
4666
4548
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4667
4549
|
export namespace copyFile {
|
|
@@ -4756,7 +4638,7 @@ declare module "path" {
|
|
|
4756
4638
|
/**
|
|
4757
4639
|
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
|
4758
4640
|
*
|
|
4759
|
-
* Starting from leftmost {from}
|
|
4641
|
+
* Starting from leftmost {from} paramter, resolves {to} to an absolute path.
|
|
4760
4642
|
*
|
|
4761
4643
|
* 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
4644
|
*
|
|
@@ -4798,11 +4680,11 @@ declare module "path" {
|
|
|
4798
4680
|
/**
|
|
4799
4681
|
* The platform-specific file separator. '\\' or '/'.
|
|
4800
4682
|
*/
|
|
4801
|
-
export var sep:
|
|
4683
|
+
export var sep: string;
|
|
4802
4684
|
/**
|
|
4803
4685
|
* The platform-specific file delimiter. ';' or ':'.
|
|
4804
4686
|
*/
|
|
4805
|
-
export var delimiter:
|
|
4687
|
+
export var delimiter: string;
|
|
4806
4688
|
/**
|
|
4807
4689
|
* Returns an object from a path string - the opposite of format().
|
|
4808
4690
|
*
|
|
@@ -4957,7 +4839,7 @@ declare module "tls" {
|
|
|
4957
4839
|
* An array of strings or a Buffer naming possible NPN protocols.
|
|
4958
4840
|
* (Protocols should be ordered by their priority.)
|
|
4959
4841
|
*/
|
|
4960
|
-
NPNProtocols?: string[] | Buffer
|
|
4842
|
+
NPNProtocols?: string[] | Buffer,
|
|
4961
4843
|
/**
|
|
4962
4844
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
4963
4845
|
* (Protocols should be ordered by their priority.) When the server
|
|
@@ -4965,7 +4847,7 @@ declare module "tls" {
|
|
|
4965
4847
|
* precedence over NPN and the server does not send an NPN extension
|
|
4966
4848
|
* to the client.
|
|
4967
4849
|
*/
|
|
4968
|
-
ALPNProtocols?: string[] | Buffer
|
|
4850
|
+
ALPNProtocols?: string[] | Buffer,
|
|
4969
4851
|
/**
|
|
4970
4852
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
4971
4853
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -5020,14 +4902,6 @@ declare module "tls" {
|
|
|
5020
4902
|
getPeerCertificate(detailed: true): DetailedPeerCertificate;
|
|
5021
4903
|
getPeerCertificate(detailed?: false): PeerCertificate;
|
|
5022
4904
|
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
4905
|
/**
|
|
5032
4906
|
* Could be used to speed up handshake establishment when reconnecting to the server.
|
|
5033
4907
|
* @returns ASN.1 encoded TLS session or undefined if none was negotiated.
|
|
@@ -5049,7 +4923,7 @@ declare module "tls" {
|
|
|
5049
4923
|
* @param callback - callback(err) will be executed with null as err, once the renegotiation
|
|
5050
4924
|
* is successfully completed.
|
|
5051
4925
|
*/
|
|
5052
|
-
renegotiate(options:
|
|
4926
|
+
renegotiate(options: TlsOptions, callback: (err: Error | null) => void): any;
|
|
5053
4927
|
/**
|
|
5054
4928
|
* Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
5055
4929
|
* Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
|
|
@@ -5092,15 +4966,30 @@ declare module "tls" {
|
|
|
5092
4966
|
prependOnceListener(event: "secureConnect", listener: () => void): this;
|
|
5093
4967
|
}
|
|
5094
4968
|
|
|
5095
|
-
export interface TlsOptions
|
|
5096
|
-
|
|
4969
|
+
export interface TlsOptions {
|
|
4970
|
+
host?: string;
|
|
4971
|
+
port?: number;
|
|
4972
|
+
pfx?: string | Buffer[];
|
|
4973
|
+
key?: string | string[] | Buffer | any[];
|
|
4974
|
+
passphrase?: string;
|
|
4975
|
+
cert?: string | string[] | Buffer | Buffer[];
|
|
4976
|
+
ca?: string | string[] | Buffer | Buffer[];
|
|
4977
|
+
crl?: string | string[];
|
|
4978
|
+
ciphers?: string;
|
|
4979
|
+
honorCipherOrder?: boolean;
|
|
5097
4980
|
requestCert?: boolean;
|
|
5098
4981
|
rejectUnauthorized?: boolean;
|
|
5099
|
-
NPNProtocols?: string[] | Buffer
|
|
5100
|
-
ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
|
|
4982
|
+
NPNProtocols?: string[] | Buffer;
|
|
5101
4983
|
SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
|
|
4984
|
+
ecdhCurve?: string;
|
|
4985
|
+
dhparam?: string | Buffer;
|
|
4986
|
+
handshakeTimeout?: number;
|
|
4987
|
+
ALPNProtocols?: string[] | Buffer;
|
|
5102
4988
|
sessionTimeout?: number;
|
|
5103
4989
|
ticketKeys?: Buffer;
|
|
4990
|
+
sessionIdContext?: string;
|
|
4991
|
+
secureProtocol?: string;
|
|
4992
|
+
secureOptions?: number;
|
|
5104
4993
|
}
|
|
5105
4994
|
|
|
5106
4995
|
export interface ConnectionOptions extends SecureContextOptions {
|
|
@@ -5109,8 +4998,8 @@ declare module "tls" {
|
|
|
5109
4998
|
path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
5110
4999
|
socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
|
|
5111
5000
|
rejectUnauthorized?: boolean; // Defaults to true
|
|
5112
|
-
NPNProtocols?: string
|
|
5113
|
-
ALPNProtocols?: string
|
|
5001
|
+
NPNProtocols?: Array<string | Buffer>;
|
|
5002
|
+
ALPNProtocols?: Array<string | Buffer>;
|
|
5114
5003
|
checkServerIdentity?: typeof checkServerIdentity;
|
|
5115
5004
|
servername?: string; // SNI TLS Extension
|
|
5116
5005
|
session?: Buffer;
|
|
@@ -5239,7 +5128,6 @@ declare module "tls" {
|
|
|
5239
5128
|
}
|
|
5240
5129
|
|
|
5241
5130
|
declare module "crypto" {
|
|
5242
|
-
import * as stream from "stream";
|
|
5243
5131
|
export interface Certificate {
|
|
5244
5132
|
exportChallenge(spkac: string | Buffer): Buffer;
|
|
5245
5133
|
exportPublicKey(spkac: string | Buffer): Buffer;
|
|
@@ -5261,9 +5149,7 @@ declare module "crypto" {
|
|
|
5261
5149
|
crl: string | string[];
|
|
5262
5150
|
ciphers: string;
|
|
5263
5151
|
}
|
|
5264
|
-
/** @deprecated since v0.11.13 - use tls.SecureContext instead. */
|
|
5265
5152
|
export interface Credentials { context?: any; }
|
|
5266
|
-
/** @deprecated since v0.11.13 - use tls.createSecureContext instead. */
|
|
5267
5153
|
export function createCredentials(details: CredentialDetails): Credentials;
|
|
5268
5154
|
export function createHash(algorithm: string): Hash;
|
|
5269
5155
|
export function createHmac(algorithm: string, key: string | Buffer): Hmac;
|
|
@@ -5274,13 +5160,13 @@ declare module "crypto" {
|
|
|
5274
5160
|
type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
|
|
5275
5161
|
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
|
|
5276
5162
|
|
|
5277
|
-
export interface Hash extends
|
|
5163
|
+
export interface Hash extends NodeJS.ReadWriteStream {
|
|
5278
5164
|
update(data: string | Buffer | DataView): Hash;
|
|
5279
5165
|
update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hash;
|
|
5280
5166
|
digest(): Buffer;
|
|
5281
5167
|
digest(encoding: HexBase64Latin1Encoding): string;
|
|
5282
5168
|
}
|
|
5283
|
-
export interface Hmac extends
|
|
5169
|
+
export interface Hmac extends NodeJS.ReadWriteStream {
|
|
5284
5170
|
update(data: string | Buffer | DataView): Hmac;
|
|
5285
5171
|
update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
|
|
5286
5172
|
digest(): Buffer;
|
|
@@ -5288,36 +5174,36 @@ declare module "crypto" {
|
|
|
5288
5174
|
}
|
|
5289
5175
|
export function createCipher(algorithm: string, password: any): Cipher;
|
|
5290
5176
|
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
|
|
5291
|
-
export interface Cipher extends
|
|
5177
|
+
export interface Cipher extends NodeJS.ReadWriteStream {
|
|
5292
5178
|
update(data: Buffer | DataView): Buffer;
|
|
5293
5179
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
|
|
5294
5180
|
update(data: Buffer | DataView, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string;
|
|
5295
5181
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string;
|
|
5296
5182
|
final(): Buffer;
|
|
5297
5183
|
final(output_encoding: string): string;
|
|
5298
|
-
setAutoPadding(auto_padding?: boolean):
|
|
5184
|
+
setAutoPadding(auto_padding?: boolean): void;
|
|
5299
5185
|
getAuthTag(): Buffer;
|
|
5300
|
-
setAAD(buffer: Buffer):
|
|
5186
|
+
setAAD(buffer: Buffer): void;
|
|
5301
5187
|
}
|
|
5302
5188
|
export function createDecipher(algorithm: string, password: any): Decipher;
|
|
5303
5189
|
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
|
|
5304
|
-
export interface Decipher extends
|
|
5190
|
+
export interface Decipher extends NodeJS.ReadWriteStream {
|
|
5305
5191
|
update(data: Buffer | DataView): Buffer;
|
|
5306
5192
|
update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
|
|
5307
5193
|
update(data: Buffer | DataView, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string;
|
|
5308
5194
|
update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string;
|
|
5309
5195
|
final(): Buffer;
|
|
5310
5196
|
final(output_encoding: string): string;
|
|
5311
|
-
setAutoPadding(auto_padding?: boolean):
|
|
5312
|
-
setAuthTag(tag: Buffer):
|
|
5313
|
-
setAAD(buffer: Buffer):
|
|
5197
|
+
setAutoPadding(auto_padding?: boolean): void;
|
|
5198
|
+
setAuthTag(tag: Buffer): void;
|
|
5199
|
+
setAAD(buffer: Buffer): void;
|
|
5314
5200
|
}
|
|
5315
5201
|
export function createSign(algorithm: string): Signer;
|
|
5316
5202
|
export interface Signer extends NodeJS.WritableStream {
|
|
5317
5203
|
update(data: string | Buffer | DataView): Signer;
|
|
5318
5204
|
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
|
|
5205
|
+
sign(private_key: string | { key: string; passphrase: string }): Buffer;
|
|
5206
|
+
sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string;
|
|
5321
5207
|
}
|
|
5322
5208
|
export function createVerify(algorith: string): Verify;
|
|
5323
5209
|
export interface Verify extends NodeJS.WritableStream {
|
|
@@ -5418,12 +5304,13 @@ declare module "stream" {
|
|
|
5418
5304
|
encoding?: string;
|
|
5419
5305
|
objectMode?: boolean;
|
|
5420
5306
|
read?: (this: Readable, size?: number) => any;
|
|
5421
|
-
destroy?: (error
|
|
5307
|
+
destroy?: (error?: Error) => any;
|
|
5422
5308
|
}
|
|
5423
5309
|
|
|
5424
5310
|
export class Readable extends Stream implements NodeJS.ReadableStream {
|
|
5425
5311
|
readable: boolean;
|
|
5426
5312
|
readonly readableHighWaterMark: number;
|
|
5313
|
+
readonly readableLength: number;
|
|
5427
5314
|
constructor(opts?: ReadableOptions);
|
|
5428
5315
|
_read(size: number): void;
|
|
5429
5316
|
read(size?: number): any;
|
|
@@ -5435,7 +5322,7 @@ declare module "stream" {
|
|
|
5435
5322
|
unshift(chunk: any): void;
|
|
5436
5323
|
wrap(oldStream: NodeJS.ReadableStream): this;
|
|
5437
5324
|
push(chunk: any, encoding?: string): boolean;
|
|
5438
|
-
_destroy(
|
|
5325
|
+
_destroy(err: Error, callback: Function): void;
|
|
5439
5326
|
destroy(error?: Error): void;
|
|
5440
5327
|
|
|
5441
5328
|
/**
|
|
@@ -5448,6 +5335,7 @@ declare module "stream" {
|
|
|
5448
5335
|
* 5. error
|
|
5449
5336
|
*/
|
|
5450
5337
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
5338
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
5451
5339
|
addListener(event: "close", listener: () => void): this;
|
|
5452
5340
|
addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
|
|
5453
5341
|
addListener(event: "end", listener: () => void): this;
|
|
@@ -5501,19 +5389,20 @@ declare module "stream" {
|
|
|
5501
5389
|
highWaterMark?: number;
|
|
5502
5390
|
decodeStrings?: boolean;
|
|
5503
5391
|
objectMode?: boolean;
|
|
5504
|
-
write?: (chunk:
|
|
5505
|
-
writev?: (chunks: Array<{ chunk:
|
|
5506
|
-
destroy?: (error
|
|
5392
|
+
write?: (chunk: string | Buffer, encoding: string, callback: Function) => any;
|
|
5393
|
+
writev?: (chunks: Array<{ chunk: string | Buffer, encoding: string }>, callback: Function) => any;
|
|
5394
|
+
destroy?: (error?: Error) => any;
|
|
5507
5395
|
final?: (callback: (error?: Error) => void) => void;
|
|
5508
5396
|
}
|
|
5509
5397
|
|
|
5510
5398
|
export class Writable extends Stream implements NodeJS.WritableStream {
|
|
5511
5399
|
writable: boolean;
|
|
5512
5400
|
readonly writableHighWaterMark: number;
|
|
5401
|
+
readonly writableLength: number;
|
|
5513
5402
|
constructor(opts?: WritableOptions);
|
|
5514
5403
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5515
|
-
_writev?(chunks: Array<{
|
|
5516
|
-
_destroy(
|
|
5404
|
+
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5405
|
+
_destroy(err: Error, callback: Function): void;
|
|
5517
5406
|
_final(callback: Function): void;
|
|
5518
5407
|
write(chunk: any, cb?: Function): boolean;
|
|
5519
5408
|
write(chunk: any, encoding?: string, cb?: Function): boolean;
|
|
@@ -5602,10 +5491,11 @@ declare module "stream" {
|
|
|
5602
5491
|
export class Duplex extends Readable implements Writable {
|
|
5603
5492
|
writable: boolean;
|
|
5604
5493
|
readonly writableHighWaterMark: number;
|
|
5494
|
+
readonly writableLength: number;
|
|
5605
5495
|
constructor(opts?: DuplexOptions);
|
|
5606
5496
|
_write(chunk: any, encoding: string, callback: (err?: Error) => void): void;
|
|
5607
|
-
_writev?(chunks: Array<{
|
|
5608
|
-
_destroy(
|
|
5497
|
+
_writev?(chunks: Array<{chunk: any, encoding: string}>, callback: (err?: Error) => void): void;
|
|
5498
|
+
_destroy(err: Error, callback: Function): void;
|
|
5609
5499
|
_final(callback: Function): void;
|
|
5610
5500
|
write(chunk: any, cb?: Function): boolean;
|
|
5611
5501
|
write(chunk: any, encoding?: string, cb?: Function): boolean;
|
|
@@ -5618,7 +5508,7 @@ declare module "stream" {
|
|
|
5618
5508
|
}
|
|
5619
5509
|
|
|
5620
5510
|
export interface TransformOptions extends DuplexOptions {
|
|
5621
|
-
transform?: (chunk:
|
|
5511
|
+
transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any;
|
|
5622
5512
|
flush?: (callback: Function) => any;
|
|
5623
5513
|
}
|
|
5624
5514
|
|
|
@@ -5629,13 +5519,6 @@ declare module "stream" {
|
|
|
5629
5519
|
}
|
|
5630
5520
|
|
|
5631
5521
|
export class PassThrough extends Transform { }
|
|
5632
|
-
|
|
5633
|
-
interface Pipe {
|
|
5634
|
-
close(): void;
|
|
5635
|
-
hasRef(): boolean;
|
|
5636
|
-
ref(): void;
|
|
5637
|
-
unref(): void;
|
|
5638
|
-
}
|
|
5639
5522
|
}
|
|
5640
5523
|
|
|
5641
5524
|
export = internal;
|
|
@@ -5649,17 +5532,18 @@ declare module "util" {
|
|
|
5649
5532
|
export function puts(...param: any[]): void;
|
|
5650
5533
|
export function print(...param: any[]): void;
|
|
5651
5534
|
export function log(string: string): void;
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5535
|
+
export var inspect: {
|
|
5536
|
+
(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
|
5537
|
+
(object: any, options: InspectOptions): string;
|
|
5538
|
+
colors: {
|
|
5656
5539
|
[color: string]: [number, number] | undefined
|
|
5657
|
-
}
|
|
5658
|
-
|
|
5540
|
+
}
|
|
5541
|
+
styles: {
|
|
5659
5542
|
[style: string]: string | undefined
|
|
5660
|
-
}
|
|
5661
|
-
|
|
5662
|
-
|
|
5543
|
+
}
|
|
5544
|
+
defaultOptions: InspectOptions;
|
|
5545
|
+
custom: symbol;
|
|
5546
|
+
};
|
|
5663
5547
|
export function isArray(object: any): object is any[];
|
|
5664
5548
|
export function isRegExp(object: any): object is RegExp;
|
|
5665
5549
|
export function isDate(object: any): object is Date;
|
|
@@ -5677,72 +5561,43 @@ declare module "util" {
|
|
|
5677
5561
|
export function isString(object: any): object is string;
|
|
5678
5562
|
export function isSymbol(object: any): object is symbol;
|
|
5679
5563
|
export function isUndefined(object: any): object is undefined;
|
|
5680
|
-
export function deprecate<T extends Function>(fn: T, message: string
|
|
5564
|
+
export function deprecate<T extends Function>(fn: T, message: string): T;
|
|
5681
5565
|
|
|
5682
5566
|
export interface CustomPromisify<TCustom extends Function> extends Function {
|
|
5683
5567
|
__promisify__: TCustom;
|
|
5684
5568
|
}
|
|
5685
5569
|
|
|
5686
5570
|
export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5687
|
-
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException
|
|
5571
|
+
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5688
5572
|
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
|
|
5573
|
+
export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5690
5574
|
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
|
|
5575
|
+
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
5576
|
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,
|
|
5577
|
+
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
5578
|
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,
|
|
5579
|
+
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
5580
|
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
|
|
5581
|
+
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
5582
|
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
|
|
5583
|
+
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
5584
|
|
|
5701
5585
|
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
|
|
5586
|
+
export function promisify<TResult>(fn: (callback: (err: Error, result: TResult) => void) => void): () => Promise<TResult>;
|
|
5587
|
+
export function promisify(fn: (callback: (err: Error) => void) => void): () => Promise<void>;
|
|
5588
|
+
export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
|
5589
|
+
export function promisify<T1>(fn: (arg1: T1, callback: (err: Error) => void) => void): (arg1: T1) => Promise<void>;
|
|
5590
|
+
export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
|
5591
|
+
export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err: Error) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
|
5592
|
+
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>;
|
|
5593
|
+
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>;
|
|
5594
|
+
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>;
|
|
5595
|
+
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>;
|
|
5596
|
+
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>;
|
|
5597
|
+
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
5598
|
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;
|
|
5599
|
+
export namespace promisify {
|
|
5600
|
+
const custom: symbol;
|
|
5746
5601
|
}
|
|
5747
5602
|
}
|
|
5748
5603
|
|
|
@@ -5756,30 +5611,34 @@ declare module "assert" {
|
|
|
5756
5611
|
expected: any;
|
|
5757
5612
|
operator: string;
|
|
5758
5613
|
generatedMessage: boolean;
|
|
5759
|
-
code: 'ERR_ASSERTION';
|
|
5760
5614
|
|
|
5761
5615
|
constructor(options?: {
|
|
5762
5616
|
message?: string; actual?: any; expected?: any;
|
|
5763
|
-
operator?: string;
|
|
5617
|
+
operator?: string; stackStartFunction?: Function
|
|
5764
5618
|
});
|
|
5765
5619
|
}
|
|
5766
5620
|
|
|
5767
|
-
export function fail(message
|
|
5768
|
-
export function fail(actual: any, expected: any, message?: string, operator?: string
|
|
5621
|
+
export function fail(message: string): void;
|
|
5622
|
+
export function fail(actual: any, expected: any, message?: string, operator?: string): void;
|
|
5769
5623
|
export function ok(value: any, message?: string): void;
|
|
5770
5624
|
export function equal(actual: any, expected: any, message?: string): void;
|
|
5771
5625
|
export function notEqual(actual: any, expected: any, message?: string): void;
|
|
5772
5626
|
export function deepEqual(actual: any, expected: any, message?: string): void;
|
|
5773
|
-
export function notDeepEqual(
|
|
5627
|
+
export function notDeepEqual(acutal: any, expected: any, message?: string): void;
|
|
5774
5628
|
export function strictEqual(actual: any, expected: any, message?: string): void;
|
|
5775
5629
|
export function notStrictEqual(actual: any, expected: any, message?: string): void;
|
|
5776
5630
|
export function deepStrictEqual(actual: any, expected: any, message?: string): void;
|
|
5777
5631
|
export function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
|
|
5778
5632
|
|
|
5779
5633
|
export function throws(block: Function, message?: string): void;
|
|
5780
|
-
export function throws(block: Function, error:
|
|
5634
|
+
export function throws(block: Function, error: Function, message?: string): void;
|
|
5635
|
+
export function throws(block: Function, error: RegExp, message?: string): void;
|
|
5636
|
+
export function throws(block: Function, error: (err: any) => boolean, message?: string): void;
|
|
5637
|
+
|
|
5781
5638
|
export function doesNotThrow(block: Function, message?: string): void;
|
|
5782
|
-
export function doesNotThrow(block: Function, error:
|
|
5639
|
+
export function doesNotThrow(block: Function, error: Function, message?: string): void;
|
|
5640
|
+
export function doesNotThrow(block: Function, error: RegExp, message?: string): void;
|
|
5641
|
+
export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void;
|
|
5783
5642
|
|
|
5784
5643
|
export function ifError(value: any): void;
|
|
5785
5644
|
}
|
|
@@ -5791,12 +5650,12 @@ declare module "tty" {
|
|
|
5791
5650
|
import * as net from "net";
|
|
5792
5651
|
|
|
5793
5652
|
export function isatty(fd: number): boolean;
|
|
5794
|
-
export
|
|
5653
|
+
export interface ReadStream extends net.Socket {
|
|
5795
5654
|
isRaw: boolean;
|
|
5796
5655
|
setRawMode(mode: boolean): void;
|
|
5797
5656
|
isTTY: boolean;
|
|
5798
5657
|
}
|
|
5799
|
-
export
|
|
5658
|
+
export interface WriteStream extends net.Socket {
|
|
5800
5659
|
columns: number;
|
|
5801
5660
|
rows: number;
|
|
5802
5661
|
isTTY: boolean;
|
|
@@ -5812,8 +5671,6 @@ declare module "domain" {
|
|
|
5812
5671
|
remove(emitter: events.EventEmitter): void;
|
|
5813
5672
|
bind(cb: (err: Error, data: any) => any): any;
|
|
5814
5673
|
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
5674
|
members: any[];
|
|
5818
5675
|
enter(): void;
|
|
5819
5676
|
exit(): void;
|
|
@@ -5822,7 +5679,6 @@ declare module "domain" {
|
|
|
5822
5679
|
export function create(): Domain;
|
|
5823
5680
|
}
|
|
5824
5681
|
|
|
5825
|
-
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
|
|
5826
5682
|
declare module "constants" {
|
|
5827
5683
|
export var E2BIG: number;
|
|
5828
5684
|
export var EACCES: number;
|
|
@@ -5958,25 +5814,15 @@ declare module "constants" {
|
|
|
5958
5814
|
export var WSA_E_NO_MORE: number;
|
|
5959
5815
|
export var WSA_E_CANCELLED: number;
|
|
5960
5816
|
export var WSAEREFUSED: number;
|
|
5961
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGHUP` instead. */
|
|
5962
5817
|
export var SIGHUP: number;
|
|
5963
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGINT` instead. */
|
|
5964
5818
|
export var SIGINT: number;
|
|
5965
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGILL` instead. */
|
|
5966
5819
|
export var SIGILL: number;
|
|
5967
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGABRT` instead. */
|
|
5968
5820
|
export var SIGABRT: number;
|
|
5969
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGFPE` instead. */
|
|
5970
5821
|
export var SIGFPE: number;
|
|
5971
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGKILL` instead. */
|
|
5972
5822
|
export var SIGKILL: number;
|
|
5973
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSEGV` instead. */
|
|
5974
5823
|
export var SIGSEGV: number;
|
|
5975
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTERM` instead. */
|
|
5976
5824
|
export var SIGTERM: number;
|
|
5977
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGBREAK` instead. */
|
|
5978
5825
|
export var SIGBREAK: number;
|
|
5979
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGWINCH` instead. */
|
|
5980
5826
|
export var SIGWINCH: number;
|
|
5981
5827
|
export var SSL_OP_ALL: number;
|
|
5982
5828
|
export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
|
|
@@ -6079,55 +5925,30 @@ declare module "constants" {
|
|
|
6079
5925
|
export var W_OK: number;
|
|
6080
5926
|
export var X_OK: number;
|
|
6081
5927
|
export var UV_UDP_REUSEADDR: number;
|
|
6082
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGQUIT` instead. */
|
|
6083
5928
|
export var SIGQUIT: number;
|
|
6084
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTRAP` instead. */
|
|
6085
5929
|
export var SIGTRAP: number;
|
|
6086
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGIOT` instead. */
|
|
6087
5930
|
export var SIGIOT: number;
|
|
6088
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGBUS` instead. */
|
|
6089
5931
|
export var SIGBUS: number;
|
|
6090
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR1` instead. */
|
|
6091
5932
|
export var SIGUSR1: number;
|
|
6092
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUSR2` instead. */
|
|
6093
5933
|
export var SIGUSR2: number;
|
|
6094
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPIPE` instead. */
|
|
6095
5934
|
export var SIGPIPE: number;
|
|
6096
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGALRM` instead. */
|
|
6097
5935
|
export var SIGALRM: number;
|
|
6098
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGCHLD` instead. */
|
|
6099
5936
|
export var SIGCHLD: number;
|
|
6100
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTKFLT` instead. */
|
|
6101
5937
|
export var SIGSTKFLT: number;
|
|
6102
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGCONT` instead. */
|
|
6103
5938
|
export var SIGCONT: number;
|
|
6104
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSTOP` instead. */
|
|
6105
5939
|
export var SIGSTOP: number;
|
|
6106
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTSTP` instead. */
|
|
6107
5940
|
export var SIGTSTP: number;
|
|
6108
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTIN` instead. */
|
|
6109
5941
|
export var SIGTTIN: number;
|
|
6110
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGTTOU` instead. */
|
|
6111
5942
|
export var SIGTTOU: number;
|
|
6112
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGURG` instead. */
|
|
6113
5943
|
export var SIGURG: number;
|
|
6114
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGXCPU` instead. */
|
|
6115
5944
|
export var SIGXCPU: number;
|
|
6116
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGXFSZ` instead. */
|
|
6117
5945
|
export var SIGXFSZ: number;
|
|
6118
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGVTALRM` instead. */
|
|
6119
5946
|
export var SIGVTALRM: number;
|
|
6120
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPROF` instead. */
|
|
6121
5947
|
export var SIGPROF: number;
|
|
6122
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGIO` instead. */
|
|
6123
5948
|
export var SIGIO: number;
|
|
6124
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPOLL` instead. */
|
|
6125
5949
|
export var SIGPOLL: number;
|
|
6126
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGPWR` instead. */
|
|
6127
5950
|
export var SIGPWR: number;
|
|
6128
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGSYS` instead. */
|
|
6129
5951
|
export var SIGSYS: number;
|
|
6130
|
-
/** @deprecated since v6.3.0 - use `os.constants.signals.SIGUNUSED` instead. */
|
|
6131
5952
|
export var SIGUNUSED: number;
|
|
6132
5953
|
export var defaultCoreCipherList: string;
|
|
6133
5954
|
export var defaultCipherList: string;
|
|
@@ -6143,7 +5964,6 @@ declare module "process" {
|
|
|
6143
5964
|
export = process;
|
|
6144
5965
|
}
|
|
6145
5966
|
|
|
6146
|
-
// tslint:disable-next-line:no-declare-current-package
|
|
6147
5967
|
declare module "v8" {
|
|
6148
5968
|
interface HeapSpaceInfo {
|
|
6149
5969
|
space_name: string;
|
|
@@ -6268,23 +6088,6 @@ declare module "async_hooks" {
|
|
|
6268
6088
|
*/
|
|
6269
6089
|
export function createHook(options: HookCallbacks): AsyncHook;
|
|
6270
6090
|
|
|
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
6091
|
/**
|
|
6289
6092
|
* The class AsyncResource was designed to be extended by the embedder's async resources.
|
|
6290
6093
|
* Using this users can easily trigger the lifetime events of their own resources.
|
|
@@ -6294,12 +6097,10 @@ declare module "async_hooks" {
|
|
|
6294
6097
|
* AsyncResource() is meant to be extended. Instantiating a
|
|
6295
6098
|
* new AsyncResource() also triggers init. If triggerAsyncId is omitted then
|
|
6296
6099
|
* 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)
|
|
6100
|
+
* @param type the name of this async resource type
|
|
6101
|
+
* @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
|
|
6301
6102
|
*/
|
|
6302
|
-
constructor(type: string, triggerAsyncId?: number
|
|
6103
|
+
constructor(type: string, triggerAsyncId?: number)
|
|
6303
6104
|
|
|
6304
6105
|
/**
|
|
6305
6106
|
* Call AsyncHooks before callbacks.
|
|
@@ -6368,14 +6169,14 @@ declare module "http2" {
|
|
|
6368
6169
|
}
|
|
6369
6170
|
|
|
6370
6171
|
export interface ServerStreamFileResponseOptions {
|
|
6371
|
-
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void
|
|
6172
|
+
statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void|boolean;
|
|
6372
6173
|
getTrailers?: (trailers: OutgoingHttpHeaders) => void;
|
|
6373
6174
|
offset?: number;
|
|
6374
6175
|
length?: number;
|
|
6375
6176
|
}
|
|
6376
6177
|
|
|
6377
6178
|
export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
|
|
6378
|
-
onError?: (err: NodeJS.ErrnoException
|
|
6179
|
+
onError?: (err: NodeJS.ErrnoException) => void;
|
|
6379
6180
|
}
|
|
6380
6181
|
|
|
6381
6182
|
export interface Http2Stream extends stream.Duplex {
|
|
@@ -6716,7 +6517,9 @@ declare module "http2" {
|
|
|
6716
6517
|
export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
|
|
6717
6518
|
export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
|
|
6718
6519
|
|
|
6719
|
-
export interface ServerOptions extends ServerSessionOptions {
|
|
6520
|
+
export interface ServerOptions extends ServerSessionOptions {
|
|
6521
|
+
allowHTTP1?: boolean;
|
|
6522
|
+
}
|
|
6720
6523
|
|
|
6721
6524
|
export interface SecureServerOptions extends SecureServerSessionOptions {
|
|
6722
6525
|
allowHTTP1?: boolean;
|
|
@@ -6816,8 +6619,7 @@ declare module "http2" {
|
|
|
6816
6619
|
prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
|
|
6817
6620
|
}
|
|
6818
6621
|
|
|
6819
|
-
export
|
|
6820
|
-
private constructor();
|
|
6622
|
+
export interface Http2ServerRequest extends stream.Readable {
|
|
6821
6623
|
headers: IncomingHttpHeaders;
|
|
6822
6624
|
httpVersion: string;
|
|
6823
6625
|
method: string;
|
|
@@ -6848,8 +6650,7 @@ declare module "http2" {
|
|
|
6848
6650
|
prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
|
|
6849
6651
|
}
|
|
6850
6652
|
|
|
6851
|
-
export
|
|
6852
|
-
private constructor();
|
|
6653
|
+
export interface Http2ServerResponse extends events.EventEmitter {
|
|
6853
6654
|
addTrailers(trailers: OutgoingHttpHeaders): void;
|
|
6854
6655
|
connection: net.Socket | tls.TLSSocket;
|
|
6855
6656
|
end(callback?: () => void): void;
|