@types/node 13.7.5 → 13.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +1 -1
- node/async_hooks.d.ts +14 -0
- node/child_process.d.ts +1 -1
- node/crypto.d.ts +5 -5
- node/globals.d.ts +9 -14
- node/http.d.ts +7 -0
- node/index.d.ts +1 -1
- node/package.json +2 -2
- node/perf_hooks.d.ts +17 -2
- node/readline.d.ts +1 -0
- node/tty.d.ts +1 -1
- node/worker_threads.d.ts +10 -0
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 13 Mar 2020 00:40:52 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node/async_hooks.d.ts
CHANGED
|
@@ -7,6 +7,20 @@ declare module "async_hooks" {
|
|
|
7
7
|
*/
|
|
8
8
|
function executionAsyncId(): number;
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* The resource representing the current execution.
|
|
12
|
+
* Useful to store data within the resource.
|
|
13
|
+
*
|
|
14
|
+
* Resource objects returned by `executionAsyncResource()` are most often internal
|
|
15
|
+
* Node.js handle objects with undocumented APIs. Using any functions or properties
|
|
16
|
+
* on the object is likely to crash your application and should be avoided.
|
|
17
|
+
*
|
|
18
|
+
* Using `executionAsyncResource()` in the top-level execution context will
|
|
19
|
+
* return an empty object as there is no handle or request object to use,
|
|
20
|
+
* but having an object representing the top-level can be helpful.
|
|
21
|
+
*/
|
|
22
|
+
function executionAsyncResource(): object;
|
|
23
|
+
|
|
10
24
|
/**
|
|
11
25
|
* Returns the ID of the resource responsible for calling the callback that is currently being executed.
|
|
12
26
|
*/
|
node/child_process.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ declare module "child_process" {
|
|
|
21
21
|
readonly killed: boolean;
|
|
22
22
|
readonly pid: number;
|
|
23
23
|
readonly connected: boolean;
|
|
24
|
-
kill(signal?: NodeJS.Signals | number):
|
|
24
|
+
kill(signal?: NodeJS.Signals | number): boolean;
|
|
25
25
|
send(message: Serializable, callback?: (error: Error | null) => void): boolean;
|
|
26
26
|
send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
|
|
27
27
|
send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
|
node/crypto.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ declare module "crypto" {
|
|
|
118
118
|
const fips: boolean;
|
|
119
119
|
|
|
120
120
|
function createHash(algorithm: string, options?: HashOptions): Hash;
|
|
121
|
-
function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac;
|
|
121
|
+
function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
|
|
122
122
|
|
|
123
123
|
type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1";
|
|
124
124
|
type HexBase64Latin1Encoding = "latin1" | "hex" | "base64";
|
|
@@ -161,7 +161,7 @@ declare module "crypto" {
|
|
|
161
161
|
asymmetricKeySize?: number;
|
|
162
162
|
export(options: KeyExportOptions<'pem'>): string | Buffer;
|
|
163
163
|
export(options?: KeyExportOptions<'der'>): Buffer;
|
|
164
|
-
|
|
164
|
+
symmetricKeySize?: number;
|
|
165
165
|
type: KeyObjectType;
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -230,17 +230,17 @@ declare module "crypto" {
|
|
|
230
230
|
|
|
231
231
|
function createDecipheriv(
|
|
232
232
|
algorithm: CipherCCMTypes,
|
|
233
|
-
key:
|
|
233
|
+
key: CipherKey,
|
|
234
234
|
iv: BinaryLike | null,
|
|
235
235
|
options: CipherCCMOptions,
|
|
236
236
|
): DecipherCCM;
|
|
237
237
|
function createDecipheriv(
|
|
238
238
|
algorithm: CipherGCMTypes,
|
|
239
|
-
key:
|
|
239
|
+
key: CipherKey,
|
|
240
240
|
iv: BinaryLike | null,
|
|
241
241
|
options?: CipherGCMOptions,
|
|
242
242
|
): DecipherGCM;
|
|
243
|
-
function createDecipheriv(algorithm: string, key:
|
|
243
|
+
function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
|
|
244
244
|
|
|
245
245
|
class Decipher extends stream.Transform {
|
|
246
246
|
private constructor();
|
node/globals.d.ts
CHANGED
|
@@ -606,6 +606,7 @@ declare namespace NodeJS {
|
|
|
606
606
|
heapTotal: number;
|
|
607
607
|
heapUsed: number;
|
|
608
608
|
external: number;
|
|
609
|
+
arrayBuffers: number;
|
|
609
610
|
}
|
|
610
611
|
|
|
611
612
|
interface CpuUsage {
|
|
@@ -871,25 +872,13 @@ declare namespace NodeJS {
|
|
|
871
872
|
|
|
872
873
|
resourceUsage(): ResourceUsage;
|
|
873
874
|
|
|
874
|
-
|
|
875
|
-
* EventEmitter
|
|
876
|
-
* 1. beforeExit
|
|
877
|
-
* 2. disconnect
|
|
878
|
-
* 3. exit
|
|
879
|
-
* 4. message
|
|
880
|
-
* 5. rejectionHandled
|
|
881
|
-
* 6. uncaughtException
|
|
882
|
-
* 7. unhandledRejection
|
|
883
|
-
* 8. warning
|
|
884
|
-
* 9. message
|
|
885
|
-
* 10. <All OS Signals>
|
|
886
|
-
* 11. newListener/removeListener inherited from EventEmitter
|
|
887
|
-
*/
|
|
875
|
+
/* EventEmitter */
|
|
888
876
|
addListener(event: "beforeExit", listener: BeforeExitListener): this;
|
|
889
877
|
addListener(event: "disconnect", listener: DisconnectListener): this;
|
|
890
878
|
addListener(event: "exit", listener: ExitListener): this;
|
|
891
879
|
addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
|
892
880
|
addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
|
881
|
+
addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
|
893
882
|
addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
894
883
|
addListener(event: "warning", listener: WarningListener): this;
|
|
895
884
|
addListener(event: "message", listener: MessageListener): this;
|
|
@@ -903,6 +892,7 @@ declare namespace NodeJS {
|
|
|
903
892
|
emit(event: "exit", code: number): boolean;
|
|
904
893
|
emit(event: "rejectionHandled", promise: Promise<any>): boolean;
|
|
905
894
|
emit(event: "uncaughtException", error: Error): boolean;
|
|
895
|
+
emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
|
|
906
896
|
emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean;
|
|
907
897
|
emit(event: "warning", warning: Error): boolean;
|
|
908
898
|
emit(event: "message", message: any, sendHandle: any): this;
|
|
@@ -916,6 +906,7 @@ declare namespace NodeJS {
|
|
|
916
906
|
on(event: "exit", listener: ExitListener): this;
|
|
917
907
|
on(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
|
918
908
|
on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
|
909
|
+
on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
|
919
910
|
on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
920
911
|
on(event: "warning", listener: WarningListener): this;
|
|
921
912
|
on(event: "message", listener: MessageListener): this;
|
|
@@ -929,6 +920,7 @@ declare namespace NodeJS {
|
|
|
929
920
|
once(event: "exit", listener: ExitListener): this;
|
|
930
921
|
once(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
|
931
922
|
once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
|
923
|
+
once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
|
932
924
|
once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
933
925
|
once(event: "warning", listener: WarningListener): this;
|
|
934
926
|
once(event: "message", listener: MessageListener): this;
|
|
@@ -942,6 +934,7 @@ declare namespace NodeJS {
|
|
|
942
934
|
prependListener(event: "exit", listener: ExitListener): this;
|
|
943
935
|
prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
|
944
936
|
prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
|
937
|
+
prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
|
945
938
|
prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
946
939
|
prependListener(event: "warning", listener: WarningListener): this;
|
|
947
940
|
prependListener(event: "message", listener: MessageListener): this;
|
|
@@ -955,6 +948,7 @@ declare namespace NodeJS {
|
|
|
955
948
|
prependOnceListener(event: "exit", listener: ExitListener): this;
|
|
956
949
|
prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
|
|
957
950
|
prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
|
|
951
|
+
prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
|
|
958
952
|
prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
959
953
|
prependOnceListener(event: "warning", listener: WarningListener): this;
|
|
960
954
|
prependOnceListener(event: "message", listener: MessageListener): this;
|
|
@@ -968,6 +962,7 @@ declare namespace NodeJS {
|
|
|
968
962
|
listeners(event: "exit"): ExitListener[];
|
|
969
963
|
listeners(event: "rejectionHandled"): RejectionHandledListener[];
|
|
970
964
|
listeners(event: "uncaughtException"): UncaughtExceptionListener[];
|
|
965
|
+
listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
|
|
971
966
|
listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
|
|
972
967
|
listeners(event: "warning"): WarningListener[];
|
|
973
968
|
listeners(event: "message"): MessageListener[];
|
node/http.d.ts
CHANGED
|
@@ -103,6 +103,13 @@ declare module "http" {
|
|
|
103
103
|
* @default 8192
|
|
104
104
|
*/
|
|
105
105
|
maxHeaderSize?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Use an insecure HTTP parser that accepts invalid HTTP headers when true.
|
|
108
|
+
* Using the insecure parser should be avoided.
|
|
109
|
+
* See --insecure-http-parser for more information.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
insecureHTTPParser?: boolean;
|
|
106
113
|
}
|
|
107
114
|
|
|
108
115
|
type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
|
node/index.d.ts
CHANGED
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.9.1",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -241,6 +241,6 @@
|
|
|
241
241
|
},
|
|
242
242
|
"scripts": {},
|
|
243
243
|
"dependencies": {},
|
|
244
|
-
"typesPublisherContentHash": "
|
|
244
|
+
"typesPublisherContentHash": "c7fe7ef57e965f33d02b1d1b221c35941a9935550535b14917968bbdcc137a43",
|
|
245
245
|
"typeScriptVersion": "2.8"
|
|
246
246
|
}
|
node/perf_hooks.d.ts
CHANGED
|
@@ -27,11 +27,18 @@ declare module 'perf_hooks' {
|
|
|
27
27
|
readonly entryType: EntryType;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies
|
|
30
|
+
* When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
|
|
31
31
|
* the type of garbage collection operation that occurred.
|
|
32
|
-
*
|
|
32
|
+
* See perf_hooks.constants for valid values.
|
|
33
33
|
*/
|
|
34
34
|
readonly kind?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
|
|
38
|
+
* property contains additional information about garbage collection operation.
|
|
39
|
+
* See perf_hooks.constants for valid values.
|
|
40
|
+
*/
|
|
41
|
+
readonly flags?: number;
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
interface PerformanceNodeTiming extends PerformanceEntry {
|
|
@@ -237,6 +244,14 @@ declare module 'perf_hooks' {
|
|
|
237
244
|
const NODE_PERFORMANCE_GC_MINOR: number;
|
|
238
245
|
const NODE_PERFORMANCE_GC_INCREMENTAL: number;
|
|
239
246
|
const NODE_PERFORMANCE_GC_WEAKCB: number;
|
|
247
|
+
|
|
248
|
+
const NODE_PERFORMANCE_GC_FLAGS_NO: number;
|
|
249
|
+
const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
|
|
250
|
+
const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
|
|
251
|
+
const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
|
|
252
|
+
const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
|
|
253
|
+
const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
|
|
254
|
+
const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
|
|
240
255
|
}
|
|
241
256
|
|
|
242
257
|
const performance: Performance;
|
node/readline.d.ts
CHANGED
|
@@ -138,6 +138,7 @@ declare module "readline" {
|
|
|
138
138
|
crlfDelay?: number;
|
|
139
139
|
removeHistoryDuplicates?: boolean;
|
|
140
140
|
escapeCodeTimeout?: number;
|
|
141
|
+
tabSize?: number;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
node/tty.d.ts
CHANGED
node/worker_threads.d.ts
CHANGED
|
@@ -117,6 +117,16 @@ declare module "worker_threads" {
|
|
|
117
117
|
*/
|
|
118
118
|
receiveMessageOnPort(port: MessagePort): {} | undefined;
|
|
119
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Returns a readable stream for a V8 snapshot of the current state of the Worker.
|
|
122
|
+
* See [`v8.getHeapSnapshot()`][] for more details.
|
|
123
|
+
*
|
|
124
|
+
* If the Worker thread is no longer running, which may occur before the
|
|
125
|
+
* [`'exit'` event][] is emitted, the returned `Promise` will be rejected
|
|
126
|
+
* immediately with an [`ERR_WORKER_NOT_RUNNING`][] error
|
|
127
|
+
*/
|
|
128
|
+
getHeapSnapshot(): Promise<Readable>;
|
|
129
|
+
|
|
120
130
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
121
131
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
122
132
|
addListener(event: "message", listener: (value: any) => void): this;
|