@types/node 14.14.1 → 14.14.5
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/fs/promises.d.ts +10 -0
- node/fs.d.ts +33 -0
- node/globals.d.ts +2 -0
- node/http.d.ts +9 -1
- node/package.json +2 -2
- node/process.d.ts +3 -1
- node/repl.d.ts +10 -2
- node/tls.d.ts +6 -4
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: Mon, 26 Oct 2020 22:58:09 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node/fs/promises.d.ts
CHANGED
|
@@ -415,6 +415,16 @@ declare module 'fs/promises' {
|
|
|
415
415
|
*/
|
|
416
416
|
function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
|
|
417
417
|
|
|
418
|
+
/**
|
|
419
|
+
* Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
|
|
420
|
+
* with the difference that if the path refers to a symbolic link, then the link is not
|
|
421
|
+
* dereferenced: instead, the timestamps of the symbolic link itself are changed.
|
|
422
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
423
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
424
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
425
|
+
*/
|
|
426
|
+
function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
427
|
+
|
|
418
428
|
/**
|
|
419
429
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
420
430
|
* @param handle A `FileHandle`.
|
node/fs.d.ts
CHANGED
|
@@ -427,6 +427,39 @@ declare module "fs" {
|
|
|
427
427
|
*/
|
|
428
428
|
export function lchownSync(path: PathLike, uid: number, gid: number): void;
|
|
429
429
|
|
|
430
|
+
/**
|
|
431
|
+
* Changes the access and modification times of a file in the same way as `fs.utimes()`,
|
|
432
|
+
* with the difference that if the path refers to a symbolic link, then the link is not
|
|
433
|
+
* dereferenced: instead, the timestamps of the symbolic link itself are changed.
|
|
434
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
435
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
436
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
437
|
+
*/
|
|
438
|
+
export function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
|
|
439
|
+
|
|
440
|
+
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
441
|
+
export namespace lutimes {
|
|
442
|
+
/**
|
|
443
|
+
* Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
|
|
444
|
+
* with the difference that if the path refers to a symbolic link, then the link is not
|
|
445
|
+
* dereferenced: instead, the timestamps of the symbolic link itself are changed.
|
|
446
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
447
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
448
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
449
|
+
*/
|
|
450
|
+
function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Change the file system timestamps of the symbolic link referenced by `path`. Returns `undefined`,
|
|
455
|
+
* or throws an exception when parameters are incorrect or the operation fails.
|
|
456
|
+
* This is the synchronous version of `fs.lutimes()`.
|
|
457
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
458
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
459
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
460
|
+
*/
|
|
461
|
+
export function lutimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
|
|
462
|
+
|
|
430
463
|
/**
|
|
431
464
|
* Asynchronous chmod(2) - Change permissions of a file.
|
|
432
465
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
node/globals.d.ts
CHANGED
|
@@ -541,6 +541,7 @@ declare namespace NodeJS {
|
|
|
541
541
|
interface Timer extends RefCounted {
|
|
542
542
|
hasRef(): boolean;
|
|
543
543
|
refresh(): this;
|
|
544
|
+
[Symbol.toPrimitive](): number;
|
|
544
545
|
}
|
|
545
546
|
|
|
546
547
|
interface Immediate extends RefCounted {
|
|
@@ -551,6 +552,7 @@ declare namespace NodeJS {
|
|
|
551
552
|
interface Timeout extends Timer {
|
|
552
553
|
hasRef(): boolean;
|
|
553
554
|
refresh(): this;
|
|
555
|
+
[Symbol.toPrimitive](): number;
|
|
554
556
|
}
|
|
555
557
|
|
|
556
558
|
type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
|
node/http.d.ts
CHANGED
|
@@ -51,6 +51,11 @@ declare module "http" {
|
|
|
51
51
|
'range'?: string;
|
|
52
52
|
'referer'?: string;
|
|
53
53
|
'retry-after'?: string;
|
|
54
|
+
'sec-websocket-accept'?: string;
|
|
55
|
+
'sec-websocket-extensions'?: string;
|
|
56
|
+
'sec-websocket-key'?: string;
|
|
57
|
+
'sec-websocket-protocol'?: string;
|
|
58
|
+
'sec-websocket-version'?: string;
|
|
54
59
|
'set-cookie'?: string[];
|
|
55
60
|
'strict-transport-security'?: string;
|
|
56
61
|
'tk'?: string;
|
|
@@ -207,7 +212,9 @@ declare module "http" {
|
|
|
207
212
|
|
|
208
213
|
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
|
|
209
214
|
class ClientRequest extends OutgoingMessage {
|
|
210
|
-
aborted:
|
|
215
|
+
aborted: boolean;
|
|
216
|
+
host: string;
|
|
217
|
+
protocol: string;
|
|
211
218
|
|
|
212
219
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
213
220
|
|
|
@@ -372,6 +379,7 @@ declare module "http" {
|
|
|
372
379
|
class Agent {
|
|
373
380
|
maxFreeSockets: number;
|
|
374
381
|
maxSockets: number;
|
|
382
|
+
maxTotalSockets: number;
|
|
375
383
|
readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
|
|
376
384
|
readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
|
|
377
385
|
readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.14.
|
|
3
|
+
"version": "14.14.5",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -246,6 +246,6 @@
|
|
|
246
246
|
},
|
|
247
247
|
"scripts": {},
|
|
248
248
|
"dependencies": {},
|
|
249
|
-
"typesPublisherContentHash": "
|
|
249
|
+
"typesPublisherContentHash": "206a5a1941c97b04fbffd53f14102a1ca47f991778959646c5dc8df1b2e6abd6",
|
|
250
250
|
"typeScriptVersion": "3.2"
|
|
251
251
|
}
|
node/process.d.ts
CHANGED
|
@@ -271,7 +271,7 @@ declare module "process" {
|
|
|
271
271
|
/**
|
|
272
272
|
* Can only be set if not in worker thread.
|
|
273
273
|
*/
|
|
274
|
-
umask(mask: number): number;
|
|
274
|
+
umask(mask: string | number): number;
|
|
275
275
|
uptime(): number;
|
|
276
276
|
hrtime: HRTime;
|
|
277
277
|
domain: Domain;
|
|
@@ -295,6 +295,8 @@ declare module "process" {
|
|
|
295
295
|
|
|
296
296
|
resourceUsage(): ResourceUsage;
|
|
297
297
|
|
|
298
|
+
traceDeprecation: boolean;
|
|
299
|
+
|
|
298
300
|
/* EventEmitter */
|
|
299
301
|
addListener(event: "beforeExit", listener: BeforeExitListener): this;
|
|
300
302
|
addListener(event: "disconnect", listener: DisconnectListener): this;
|
node/repl.d.ts
CHANGED
|
@@ -136,13 +136,21 @@ declare module "repl" {
|
|
|
136
136
|
*/
|
|
137
137
|
readonly context: Context;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* @deprecated since v14.3.0 - Use `input` instead.
|
|
140
140
|
*/
|
|
141
141
|
readonly inputStream: NodeJS.ReadableStream;
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
143
|
+
* @deprecated since v14.3.0 - Use `output` instead.
|
|
144
144
|
*/
|
|
145
145
|
readonly outputStream: NodeJS.WritableStream;
|
|
146
|
+
/**
|
|
147
|
+
* The `Readable` stream from which REPL input will be read.
|
|
148
|
+
*/
|
|
149
|
+
readonly input: NodeJS.ReadableStream;
|
|
150
|
+
/**
|
|
151
|
+
* The `Writable` stream to which REPL output will be written.
|
|
152
|
+
*/
|
|
153
|
+
readonly output: NodeJS.WritableStream;
|
|
146
154
|
/**
|
|
147
155
|
* The commands registered via `replServer.defineCommand()`.
|
|
148
156
|
*/
|
node/tls.d.ts
CHANGED
|
@@ -707,12 +707,14 @@ declare module "tls" {
|
|
|
707
707
|
*/
|
|
708
708
|
sessionIdContext?: string;
|
|
709
709
|
/**
|
|
710
|
-
* 48
|
|
710
|
+
* 48-bytes of cryptographically strong pseudo-random data.
|
|
711
|
+
* See Session Resumption for more information.
|
|
711
712
|
*/
|
|
712
713
|
ticketKeys?: Buffer;
|
|
713
714
|
/**
|
|
714
|
-
* The number of seconds after which a TLS session created by the
|
|
715
|
-
* will no longer be resumable.
|
|
715
|
+
* The number of seconds after which a TLS session created by the
|
|
716
|
+
* server will no longer be resumable. See Session Resumption for more
|
|
717
|
+
* information. Default: 300.
|
|
716
718
|
*/
|
|
717
719
|
sessionTimeout?: number;
|
|
718
720
|
}
|
|
@@ -738,7 +740,7 @@ declare module "tls" {
|
|
|
738
740
|
* @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
|
|
739
741
|
*/
|
|
740
742
|
function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
|
|
741
|
-
function createSecureContext(
|
|
743
|
+
function createSecureContext(options?: SecureContextOptions): SecureContext;
|
|
742
744
|
function getCiphers(): string[];
|
|
743
745
|
|
|
744
746
|
/**
|