@types/node 12.20.41 → 13.1.2
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 v12.20/LICENSE → node/LICENSE +21 -21
- node/README.md +16 -0
- node/assert.d.ts +50 -0
- node/async_hooks.d.ts +132 -0
- node/base.d.ts +41 -0
- node v12.20/buffer.d.ts → node/buffer.d.ts +1 -1
- node v12.20/child_process.d.ts → node/child_process.d.ts +111 -113
- node v12.20/cluster.d.ts → node/cluster.d.ts +25 -19
- node/console.d.ts +3 -0
- node/constants.d.ts +8 -0
- node/crypto.d.ts +615 -0
- node v12.20/dgram.d.ts → node/dgram.d.ts +48 -25
- node v12.20/dns.d.ts → node/dns.d.ts +6 -12
- node v12.20/domain.d.ts → node/domain.d.ts +2 -2
- node/events.d.ts +40 -0
- node v12.20/fs.d.ts → node/fs.d.ts +162 -262
- node v12.20/globals.d.ts → node/globals.d.ts +104 -260
- node v12.20/http.d.ts → node/http.d.ts +102 -177
- node v12.20/http2.d.ts → node/http2.d.ts +82 -87
- node/https.d.ts +53 -0
- node/index.d.ts +83 -0
- node v12.20/inspector.d.ts → node/inspector.d.ts +153 -159
- node/module.d.ts +20 -0
- node v12.20/net.d.ts → node/net.d.ts +37 -47
- node/os.d.ts +231 -0
- node v12.20/package.json → node/package.json +45 -9
- node/path.d.ts +153 -0
- node v12.20/perf_hooks.d.ts → node/perf_hooks.d.ts +76 -31
- node v12.20/process.d.ts → node/process.d.ts +2 -2
- node/punycode.d.ts +12 -0
- node v12.20/querystring.d.ts → node/querystring.d.ts +5 -5
- node v12.20/readline.d.ts → node/readline.d.ts +16 -17
- node v12.20/repl.d.ts → node/repl.d.ts +24 -32
- node v12.20/stream.d.ts → node/stream.d.ts +33 -43
- node v12.20/string_decoder.d.ts → node/string_decoder.d.ts +1 -1
- node v12.20/timers.d.ts → node/timers.d.ts +1 -1
- node v12.20/tls.d.ts → node/tls.d.ts +54 -65
- node v12.20/trace_events.d.ts → node/trace_events.d.ts +1 -1
- node/ts3.2/fs.d.ts +33 -0
- node/ts3.2/globals.d.ts +19 -0
- node/ts3.2/index.d.ts +16 -0
- node/ts3.2/util.d.ts +9 -0
- node v12.20/tty.d.ts → node/tty.d.ts +3 -3
- node v12.20/url.d.ts → node/url.d.ts +17 -24
- node v12.20/util.d.ts → node/util.d.ts +22 -37
- node v12.20/v8.d.ts → node/v8.d.ts +2 -12
- node v12.20/vm.d.ts → node/vm.d.ts +22 -24
- node v12.20/worker_threads.d.ts → node/worker_threads.d.ts +39 -85
- node v12.20/zlib.d.ts → node/zlib.d.ts +134 -138
- node v12.20/README.md +0 -16
- node v12.20/assert.d.ts +0 -117
- node v12.20/async_hooks.d.ts +0 -246
- node v12.20/console.d.ts +0 -3
- node v12.20/constants.d.ts +0 -448
- node v12.20/crypto.d.ts +0 -1159
- node v12.20/events.d.ts +0 -47
- node v12.20/globals.global.d.ts +0 -1
- node v12.20/https.d.ts +0 -156
- node v12.20/index.d.ts +0 -91
- node v12.20/module.d.ts +0 -3
- node v12.20/os.d.ts +0 -263
- node v12.20/path.d.ts +0 -159
- node v12.20/punycode.d.ts +0 -75
- node v12.20/wasi.d.ts +0 -55
|
@@ -1,51 +1,46 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import
|
|
3
|
-
import * as fs from
|
|
4
|
-
import * as net from
|
|
5
|
-
import * as stream from
|
|
6
|
-
import * as tls from
|
|
7
|
-
import * as url from
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
OutgoingHttpHeaders,
|
|
12
|
-
IncomingMessage,
|
|
13
|
-
ServerResponse,
|
|
14
|
-
} from 'http';
|
|
15
|
-
export { OutgoingHttpHeaders } from 'http';
|
|
1
|
+
declare module "http2" {
|
|
2
|
+
import * as events from "events";
|
|
3
|
+
import * as fs from "fs";
|
|
4
|
+
import * as net from "net";
|
|
5
|
+
import * as stream from "stream";
|
|
6
|
+
import * as tls from "tls";
|
|
7
|
+
import * as url from "url";
|
|
8
|
+
|
|
9
|
+
import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from "http";
|
|
10
|
+
export { OutgoingHttpHeaders } from "http";
|
|
16
11
|
|
|
17
12
|
export interface IncomingHttpStatusHeader {
|
|
18
|
-
":status"?: number
|
|
13
|
+
":status"?: number;
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
|
|
22
|
-
":path"?: string
|
|
23
|
-
":method"?: string
|
|
24
|
-
":authority"?: string
|
|
25
|
-
":scheme"?: string
|
|
17
|
+
":path"?: string;
|
|
18
|
+
":method"?: string;
|
|
19
|
+
":authority"?: string;
|
|
20
|
+
":scheme"?: string;
|
|
26
21
|
}
|
|
27
22
|
|
|
28
23
|
// Http2Stream
|
|
29
24
|
|
|
30
25
|
export interface StreamPriorityOptions {
|
|
31
|
-
exclusive?: boolean
|
|
32
|
-
parent?: number
|
|
33
|
-
weight?: number
|
|
34
|
-
silent?: boolean
|
|
26
|
+
exclusive?: boolean;
|
|
27
|
+
parent?: number;
|
|
28
|
+
weight?: number;
|
|
29
|
+
silent?: boolean;
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
export interface StreamState {
|
|
38
|
-
localWindowSize?: number
|
|
39
|
-
state?: number
|
|
40
|
-
localClose?: number
|
|
41
|
-
remoteClose?: number
|
|
42
|
-
sumDependencyWeight?: number
|
|
43
|
-
weight?: number
|
|
33
|
+
localWindowSize?: number;
|
|
34
|
+
state?: number;
|
|
35
|
+
localClose?: number;
|
|
36
|
+
remoteClose?: number;
|
|
37
|
+
sumDependencyWeight?: number;
|
|
38
|
+
weight?: number;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
41
|
export interface ServerStreamResponseOptions {
|
|
47
|
-
endStream?: boolean
|
|
48
|
-
waitForTrailers?: boolean
|
|
42
|
+
endStream?: boolean;
|
|
43
|
+
waitForTrailers?: boolean;
|
|
49
44
|
}
|
|
50
45
|
|
|
51
46
|
export interface StatOptions {
|
|
@@ -55,9 +50,9 @@ declare module 'http2' {
|
|
|
55
50
|
|
|
56
51
|
export interface ServerStreamFileResponseOptions {
|
|
57
52
|
statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
|
|
58
|
-
waitForTrailers?: boolean
|
|
59
|
-
offset?: number
|
|
60
|
-
length?: number
|
|
53
|
+
waitForTrailers?: boolean;
|
|
54
|
+
offset?: number;
|
|
55
|
+
length?: number;
|
|
61
56
|
}
|
|
62
57
|
|
|
63
58
|
export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
|
|
@@ -74,12 +69,12 @@ declare module 'http2' {
|
|
|
74
69
|
* indicating that no additional data should be received and the readable side of the Http2Stream will be closed.
|
|
75
70
|
*/
|
|
76
71
|
readonly endAfterHeaders: boolean;
|
|
77
|
-
readonly id?: number
|
|
72
|
+
readonly id?: number;
|
|
78
73
|
readonly pending: boolean;
|
|
79
74
|
readonly rstCode: number;
|
|
80
75
|
readonly sentHeaders: OutgoingHttpHeaders;
|
|
81
|
-
readonly sentInfoHeaders?: OutgoingHttpHeaders[]
|
|
82
|
-
readonly sentTrailers?: OutgoingHttpHeaders
|
|
76
|
+
readonly sentInfoHeaders?: OutgoingHttpHeaders[];
|
|
77
|
+
readonly sentTrailers?: OutgoingHttpHeaders;
|
|
83
78
|
readonly session: Http2Session;
|
|
84
79
|
readonly state: StreamState;
|
|
85
80
|
|
|
@@ -237,43 +232,43 @@ declare module 'http2' {
|
|
|
237
232
|
// Http2Session
|
|
238
233
|
|
|
239
234
|
export interface Settings {
|
|
240
|
-
headerTableSize?: number
|
|
241
|
-
enablePush?: boolean
|
|
242
|
-
initialWindowSize?: number
|
|
243
|
-
maxFrameSize?: number
|
|
244
|
-
maxConcurrentStreams?: number
|
|
245
|
-
maxHeaderListSize?: number
|
|
246
|
-
enableConnectProtocol?: boolean
|
|
235
|
+
headerTableSize?: number;
|
|
236
|
+
enablePush?: boolean;
|
|
237
|
+
initialWindowSize?: number;
|
|
238
|
+
maxFrameSize?: number;
|
|
239
|
+
maxConcurrentStreams?: number;
|
|
240
|
+
maxHeaderListSize?: number;
|
|
241
|
+
enableConnectProtocol?: boolean;
|
|
247
242
|
}
|
|
248
243
|
|
|
249
244
|
export interface ClientSessionRequestOptions {
|
|
250
|
-
endStream?: boolean
|
|
251
|
-
exclusive?: boolean
|
|
252
|
-
parent?: number
|
|
253
|
-
weight?: number
|
|
254
|
-
waitForTrailers?: boolean
|
|
245
|
+
endStream?: boolean;
|
|
246
|
+
exclusive?: boolean;
|
|
247
|
+
parent?: number;
|
|
248
|
+
weight?: number;
|
|
249
|
+
waitForTrailers?: boolean;
|
|
255
250
|
}
|
|
256
251
|
|
|
257
252
|
export interface SessionState {
|
|
258
|
-
effectiveLocalWindowSize?: number
|
|
259
|
-
effectiveRecvDataLength?: number
|
|
260
|
-
nextStreamID?: number
|
|
261
|
-
localWindowSize?: number
|
|
262
|
-
lastProcStreamID?: number
|
|
263
|
-
remoteWindowSize?: number
|
|
264
|
-
outboundQueueSize?: number
|
|
265
|
-
deflateDynamicTableSize?: number
|
|
266
|
-
inflateDynamicTableSize?: number
|
|
253
|
+
effectiveLocalWindowSize?: number;
|
|
254
|
+
effectiveRecvDataLength?: number;
|
|
255
|
+
nextStreamID?: number;
|
|
256
|
+
localWindowSize?: number;
|
|
257
|
+
lastProcStreamID?: number;
|
|
258
|
+
remoteWindowSize?: number;
|
|
259
|
+
outboundQueueSize?: number;
|
|
260
|
+
deflateDynamicTableSize?: number;
|
|
261
|
+
inflateDynamicTableSize?: number;
|
|
267
262
|
}
|
|
268
263
|
|
|
269
|
-
export interface Http2Session extends EventEmitter {
|
|
270
|
-
readonly alpnProtocol?: string
|
|
264
|
+
export interface Http2Session extends events.EventEmitter {
|
|
265
|
+
readonly alpnProtocol?: string;
|
|
271
266
|
readonly closed: boolean;
|
|
272
267
|
readonly connecting: boolean;
|
|
273
268
|
readonly destroyed: boolean;
|
|
274
|
-
readonly encrypted?: boolean
|
|
269
|
+
readonly encrypted?: boolean;
|
|
275
270
|
readonly localSettings: Settings;
|
|
276
|
-
readonly originSet?: string[]
|
|
271
|
+
readonly originSet?: string[];
|
|
277
272
|
readonly pendingSettingsAck: boolean;
|
|
278
273
|
readonly remoteSettings: Settings;
|
|
279
274
|
readonly socket: net.Socket | tls.TLSSocket;
|
|
@@ -361,7 +356,7 @@ declare module 'http2' {
|
|
|
361
356
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
362
357
|
|
|
363
358
|
emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
|
|
364
|
-
emit(event: "origin", origins:
|
|
359
|
+
emit(event: "origin", origins: string[]): boolean;
|
|
365
360
|
emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
|
|
366
361
|
emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
|
|
367
362
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
@@ -429,29 +424,29 @@ declare module 'http2' {
|
|
|
429
424
|
// Http2Server
|
|
430
425
|
|
|
431
426
|
export interface SessionOptions {
|
|
432
|
-
maxDeflateDynamicTableSize?: number
|
|
433
|
-
maxSessionMemory?: number
|
|
434
|
-
maxHeaderListPairs?: number
|
|
435
|
-
maxOutstandingPings?: number
|
|
436
|
-
maxSendHeaderBlockLength?: number
|
|
437
|
-
paddingStrategy?: number
|
|
438
|
-
peerMaxConcurrentStreams?: number
|
|
439
|
-
settings?: Settings
|
|
427
|
+
maxDeflateDynamicTableSize?: number;
|
|
428
|
+
maxSessionMemory?: number;
|
|
429
|
+
maxHeaderListPairs?: number;
|
|
430
|
+
maxOutstandingPings?: number;
|
|
431
|
+
maxSendHeaderBlockLength?: number;
|
|
432
|
+
paddingStrategy?: number;
|
|
433
|
+
peerMaxConcurrentStreams?: number;
|
|
434
|
+
settings?: Settings;
|
|
440
435
|
|
|
441
436
|
selectPadding?(frameLen: number, maxFrameLen: number): number;
|
|
442
437
|
createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
|
|
443
438
|
}
|
|
444
439
|
|
|
445
440
|
export interface ClientSessionOptions extends SessionOptions {
|
|
446
|
-
maxReservedRemoteStreams?: number
|
|
447
|
-
createConnection?: (
|
|
441
|
+
maxReservedRemoteStreams?: number;
|
|
442
|
+
createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
|
|
448
443
|
}
|
|
449
444
|
|
|
450
445
|
export interface ServerSessionOptions extends SessionOptions {
|
|
451
|
-
Http1IncomingMessage?: typeof IncomingMessage
|
|
452
|
-
Http1ServerResponse?: typeof ServerResponse
|
|
453
|
-
Http2ServerRequest?: typeof Http2ServerRequest
|
|
454
|
-
Http2ServerResponse?: typeof Http2ServerResponse
|
|
446
|
+
Http1IncomingMessage?: typeof IncomingMessage;
|
|
447
|
+
Http1ServerResponse?: typeof ServerResponse;
|
|
448
|
+
Http2ServerRequest?: typeof Http2ServerRequest;
|
|
449
|
+
Http2ServerResponse?: typeof Http2ServerResponse;
|
|
455
450
|
}
|
|
456
451
|
|
|
457
452
|
export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
|
|
@@ -460,8 +455,8 @@ declare module 'http2' {
|
|
|
460
455
|
export interface ServerOptions extends ServerSessionOptions { }
|
|
461
456
|
|
|
462
457
|
export interface SecureServerOptions extends SecureServerSessionOptions {
|
|
463
|
-
allowHTTP1?: boolean
|
|
464
|
-
origins?: string[]
|
|
458
|
+
allowHTTP1?: boolean;
|
|
459
|
+
origins?: string[];
|
|
465
460
|
}
|
|
466
461
|
|
|
467
462
|
export interface Http2Server extends net.Server {
|
|
@@ -575,7 +570,7 @@ declare module 'http2' {
|
|
|
575
570
|
}
|
|
576
571
|
|
|
577
572
|
export class Http2ServerRequest extends stream.Readable {
|
|
578
|
-
constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders:
|
|
573
|
+
constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string[]);
|
|
579
574
|
|
|
580
575
|
readonly aborted: boolean;
|
|
581
576
|
readonly authority: string;
|
|
@@ -588,7 +583,7 @@ declare module 'http2' {
|
|
|
588
583
|
readonly socket: net.Socket | tls.TLSSocket;
|
|
589
584
|
readonly stream: ServerHttp2Stream;
|
|
590
585
|
readonly trailers: IncomingHttpHeaders;
|
|
591
|
-
url: string;
|
|
586
|
+
readonly url: string;
|
|
592
587
|
|
|
593
588
|
setTimeout(msecs: number, callback?: () => void): void;
|
|
594
589
|
read(size?: number): Buffer | string | null;
|
|
@@ -642,7 +637,7 @@ declare module 'http2' {
|
|
|
642
637
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
643
638
|
}
|
|
644
639
|
|
|
645
|
-
export class Http2ServerResponse extends stream.
|
|
640
|
+
export class Http2ServerResponse extends stream.Stream {
|
|
646
641
|
constructor(stream: ServerHttp2Stream);
|
|
647
642
|
|
|
648
643
|
readonly connection: net.Socket | tls.TLSSocket;
|
|
@@ -654,15 +649,15 @@ declare module 'http2' {
|
|
|
654
649
|
statusCode: number;
|
|
655
650
|
statusMessage: '';
|
|
656
651
|
addTrailers(trailers: OutgoingHttpHeaders): void;
|
|
657
|
-
end(callback?: () => void):
|
|
658
|
-
end(data: string | Uint8Array, callback?: () => void):
|
|
659
|
-
end(data: string | Uint8Array, encoding: string, callback?: () => void):
|
|
652
|
+
end(callback?: () => void): void;
|
|
653
|
+
end(data: string | Uint8Array, callback?: () => void): void;
|
|
654
|
+
end(data: string | Uint8Array, encoding: string, callback?: () => void): void;
|
|
660
655
|
getHeader(name: string): string;
|
|
661
656
|
getHeaderNames(): string[];
|
|
662
657
|
getHeaders(): OutgoingHttpHeaders;
|
|
663
658
|
hasHeader(name: string): boolean;
|
|
664
659
|
removeHeader(name: string): void;
|
|
665
|
-
setHeader(name: string, value: number | string |
|
|
660
|
+
setHeader(name: string, value: number | string | string[]): void;
|
|
666
661
|
setTimeout(msecs: number, callback?: () => void): void;
|
|
667
662
|
write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
|
|
668
663
|
write(chunk: string | Uint8Array, encoding: string, callback?: (err: Error) => void): boolean;
|
node/https.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
declare module "https" {
|
|
2
|
+
import * as tls from "tls";
|
|
3
|
+
import * as events from "events";
|
|
4
|
+
import * as http from "http";
|
|
5
|
+
import { URL } from "url";
|
|
6
|
+
|
|
7
|
+
type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
|
|
8
|
+
|
|
9
|
+
type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
|
|
10
|
+
rejectUnauthorized?: boolean; // Defaults to true
|
|
11
|
+
servername?: string; // SNI TLS Extension
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
|
|
15
|
+
rejectUnauthorized?: boolean;
|
|
16
|
+
maxCachedSessions?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class Agent extends http.Agent {
|
|
20
|
+
constructor(options?: AgentOptions);
|
|
21
|
+
options: AgentOptions;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class Server extends tls.Server {
|
|
25
|
+
constructor(requestListener?: http.RequestListener);
|
|
26
|
+
constructor(options: ServerOptions, requestListener?: http.RequestListener);
|
|
27
|
+
|
|
28
|
+
setTimeout(callback: () => void): this;
|
|
29
|
+
setTimeout(msecs?: number, callback?: () => void): this;
|
|
30
|
+
/**
|
|
31
|
+
* Limits maximum incoming headers count. If set to 0, no limit will be applied.
|
|
32
|
+
* @default 2000
|
|
33
|
+
* {@link https://nodejs.org/api/http.html#http_server_maxheaderscount}
|
|
34
|
+
*/
|
|
35
|
+
maxHeadersCount: number | null;
|
|
36
|
+
timeout: number;
|
|
37
|
+
/**
|
|
38
|
+
* Limit the amount of time the parser will wait to receive the complete HTTP headers.
|
|
39
|
+
* @default 40000
|
|
40
|
+
* {@link https://nodejs.org/api/http.html#http_server_headerstimeout}
|
|
41
|
+
*/
|
|
42
|
+
headersTimeout: number;
|
|
43
|
+
keepAliveTimeout: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function createServer(requestListener?: http.RequestListener): Server;
|
|
47
|
+
function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
|
|
48
|
+
function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
49
|
+
function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
50
|
+
function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
51
|
+
function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
52
|
+
let globalAgent: Agent;
|
|
53
|
+
}
|
node/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Type definitions for non-npm package Node.js 13.1
|
|
2
|
+
// Project: http://nodejs.org/
|
|
3
|
+
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
|
+
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
5
|
+
// Alberto Schiabel <https://github.com/jkomyno>
|
|
6
|
+
// Alexander T. <https://github.com/a-tarasyuk>
|
|
7
|
+
// Alvis HT Tang <https://github.com/alvis>
|
|
8
|
+
// Andrew Makarov <https://github.com/r3nya>
|
|
9
|
+
// Benjamin Toueg <https://github.com/btoueg>
|
|
10
|
+
// Bruno Scheufler <https://github.com/brunoscheufler>
|
|
11
|
+
// Chigozirim C. <https://github.com/smac89>
|
|
12
|
+
// Christian Vaagland Tellnes <https://github.com/tellnes>
|
|
13
|
+
// David Junger <https://github.com/touffy>
|
|
14
|
+
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
|
15
|
+
// Eugene Y. Q. Shen <https://github.com/eyqs>
|
|
16
|
+
// Flarna <https://github.com/Flarna>
|
|
17
|
+
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
|
18
|
+
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
|
19
|
+
// Huw <https://github.com/hoo29>
|
|
20
|
+
// Kelvin Jin <https://github.com/kjin>
|
|
21
|
+
// Klaus Meinhardt <https://github.com/ajafff>
|
|
22
|
+
// Lishude <https://github.com/islishude>
|
|
23
|
+
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
|
24
|
+
// Mohsen Azimi <https://github.com/mohsen1>
|
|
25
|
+
// Nicolas Even <https://github.com/n-e>
|
|
26
|
+
// Nicolas Voigt <https://github.com/octo-sniffle>
|
|
27
|
+
// Nikita Galkin <https://github.com/galkin>
|
|
28
|
+
// Parambir Singh <https://github.com/parambirs>
|
|
29
|
+
// Sebastian Silbermann <https://github.com/eps1lon>
|
|
30
|
+
// Simon Schick <https://github.com/SimonSchick>
|
|
31
|
+
// Thomas den Hollander <https://github.com/ThomasdenH>
|
|
32
|
+
// Wilco Bakker <https://github.com/WilcoBakker>
|
|
33
|
+
// wwwy3y3 <https://github.com/wwwy3y3>
|
|
34
|
+
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
|
35
|
+
// Samuel Ainsworth <https://github.com/samuela>
|
|
36
|
+
// Kyle Uehlein <https://github.com/kuehlein>
|
|
37
|
+
// Jordi Oliveras Rovira <https://github.com/j-oliveras>
|
|
38
|
+
// Thanik Bhongbhibhat <https://github.com/bhongy>
|
|
39
|
+
// Marcin Kopacz <https://github.com/chyzwar>
|
|
40
|
+
// Trivikram Kamat <https://github.com/trivikr>
|
|
41
|
+
// Minh Son Nguyen <https://github.com/nguymin4>
|
|
42
|
+
// Junxiao Shi <https://github.com/yoursunny>
|
|
43
|
+
// Ilia Baryshnikov <https://github.com/qwelias>
|
|
44
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
45
|
+
|
|
46
|
+
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
|
47
|
+
|
|
48
|
+
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
49
|
+
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
50
|
+
// - ~/index.d.ts - Definitions specific to TypeScript 2.8
|
|
51
|
+
// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2
|
|
52
|
+
|
|
53
|
+
// NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides
|
|
54
|
+
// within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions
|
|
55
|
+
// prior to TypeScript 3.2, so the older definitions will be found here.
|
|
56
|
+
|
|
57
|
+
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
58
|
+
/// <reference path="base.d.ts" />
|
|
59
|
+
|
|
60
|
+
// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`)
|
|
61
|
+
// Empty interfaces are used here which merge fine with the real declarations in the lib XXX files
|
|
62
|
+
// just to ensure the names are known and node typings can be sued without importing these libs.
|
|
63
|
+
// if someone really needs these types the libs need to be added via --lib or in tsconfig.json
|
|
64
|
+
interface AsyncIterable<T> { }
|
|
65
|
+
interface IterableIterator<T> { }
|
|
66
|
+
interface AsyncIterableIterator<T> {}
|
|
67
|
+
interface SymbolConstructor {
|
|
68
|
+
readonly asyncIterator: symbol;
|
|
69
|
+
}
|
|
70
|
+
declare var Symbol: SymbolConstructor;
|
|
71
|
+
// even this is just a forward declaration some properties are added otherwise
|
|
72
|
+
// it would be allowed to pass anything to e.g. Buffer.from()
|
|
73
|
+
interface SharedArrayBuffer {
|
|
74
|
+
readonly byteLength: number;
|
|
75
|
+
slice(begin?: number, end?: number): SharedArrayBuffer;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare module "util" {
|
|
79
|
+
namespace types {
|
|
80
|
+
function isBigInt64Array(value: any): boolean;
|
|
81
|
+
function isBigUint64Array(value: any): boolean;
|
|
82
|
+
}
|
|
83
|
+
}
|