@types/node 16.7.12 → 16.9.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/README.md +2 -2
- node/crypto.d.ts +21 -2
- node/index.d.ts +2 -2
- node/package.json +2 -2
- node/stream.d.ts +37 -0
- node/url.d.ts +1 -1
- node/util.d.ts +8 -0
node/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
> `npm install --save @types/node`
|
|
3
3
|
|
|
4
4
|
# Summary
|
|
5
|
-
This package contains type definitions for Node.js (
|
|
5
|
+
This package contains type definitions for Node.js (https://nodejs.org/).
|
|
6
6
|
|
|
7
7
|
# Details
|
|
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: Thu, 16 Sep 2021 21:31:22 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node/crypto.d.ts
CHANGED
|
@@ -508,6 +508,18 @@ declare module 'crypto' {
|
|
|
508
508
|
* Public exponent (RSA).
|
|
509
509
|
*/
|
|
510
510
|
publicExponent?: bigint | undefined;
|
|
511
|
+
/**
|
|
512
|
+
* Name of the message digest (RSA-PSS).
|
|
513
|
+
*/
|
|
514
|
+
hashAlgorithm?: string | undefined;
|
|
515
|
+
/**
|
|
516
|
+
* Name of the message digest used by MGF1 (RSA-PSS).
|
|
517
|
+
*/
|
|
518
|
+
mgf1HashAlgorithm?: string | undefined;
|
|
519
|
+
/**
|
|
520
|
+
* Minimal salt length in bytes (RSA-PSS).
|
|
521
|
+
*/
|
|
522
|
+
saltLength?: number | undefined;
|
|
511
523
|
/**
|
|
512
524
|
* Size of q in bits (DSA).
|
|
513
525
|
*/
|
|
@@ -535,6 +547,10 @@ declare module 'crypto' {
|
|
|
535
547
|
*/
|
|
536
548
|
class KeyObject {
|
|
537
549
|
private constructor();
|
|
550
|
+
/**
|
|
551
|
+
* @since v15.0.0
|
|
552
|
+
*/
|
|
553
|
+
static from(key: webcrypto.CryptoKey): KeyObject;
|
|
538
554
|
/**
|
|
539
555
|
* For asymmetric keys, this property represents the type of the key. Supported key
|
|
540
556
|
* types are:
|
|
@@ -565,8 +581,11 @@ declare module 'crypto' {
|
|
|
565
581
|
* through this property can be used to uniquely identify a key or to compromise
|
|
566
582
|
* the security of the key.
|
|
567
583
|
*
|
|
568
|
-
* RSA-PSS
|
|
569
|
-
*
|
|
584
|
+
* For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
|
|
585
|
+
* the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
|
|
586
|
+
* set.
|
|
587
|
+
*
|
|
588
|
+
* Other key details might be exposed via this API using additional attributes.
|
|
570
589
|
* @since v15.7.0
|
|
571
590
|
*/
|
|
572
591
|
asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
|
node/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Type definitions for non-npm package Node.js 16.
|
|
2
|
-
// Project:
|
|
1
|
+
// Type definitions for non-npm package Node.js 16.9
|
|
2
|
+
// Project: https://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
5
5
|
// Alberto Schiabel <https://github.com/jkomyno>
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.9.2",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -230,6 +230,6 @@
|
|
|
230
230
|
},
|
|
231
231
|
"scripts": {},
|
|
232
232
|
"dependencies": {},
|
|
233
|
-
"typesPublisherContentHash": "
|
|
233
|
+
"typesPublisherContentHash": "7ac745248f781ac1d3209d00dc718167ba1fb626b648061d112f72002ea39945",
|
|
234
234
|
"typeScriptVersion": "3.7"
|
|
235
235
|
}
|
node/stream.d.ts
CHANGED
|
@@ -52,12 +52,27 @@ declare module 'stream' {
|
|
|
52
52
|
* A utility method for creating Readable Streams out of iterators.
|
|
53
53
|
*/
|
|
54
54
|
static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
|
|
55
|
+
/**
|
|
56
|
+
* Returns whether the stream has been read from or cancelled.
|
|
57
|
+
* @since v16.8.0
|
|
58
|
+
*/
|
|
59
|
+
static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Returns whether the stream was destroyed or errored before emitting `'end'`.
|
|
62
|
+
* @since v16.8.0
|
|
63
|
+
*/
|
|
64
|
+
readonly readableAborted: boolean;
|
|
55
65
|
/**
|
|
56
66
|
* Is `true` if it is safe to call `readable.read()`, which means
|
|
57
67
|
* the stream has not been destroyed or emitted `'error'` or `'end'`.
|
|
58
68
|
* @since v11.4.0
|
|
59
69
|
*/
|
|
60
70
|
readable: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Returns whether `'data'` has been emitted.
|
|
73
|
+
* @since v16.7.0
|
|
74
|
+
*/
|
|
75
|
+
readonly readableDidRead: boolean;
|
|
61
76
|
/**
|
|
62
77
|
* Getter for the property `encoding` of a given `Readable` stream. The `encoding`property can be set using the `readable.setEncoding()` method.
|
|
63
78
|
* @since v12.7.0
|
|
@@ -792,6 +807,28 @@ declare module 'stream' {
|
|
|
792
807
|
readonly writableCorked: number;
|
|
793
808
|
allowHalfOpen: boolean;
|
|
794
809
|
constructor(opts?: DuplexOptions);
|
|
810
|
+
/**
|
|
811
|
+
* A utility method for creating duplex streams.
|
|
812
|
+
*
|
|
813
|
+
* - `Stream` converts writable stream into writable `Duplex` and readable stream
|
|
814
|
+
* to `Duplex`.
|
|
815
|
+
* - `Blob` converts into readable `Duplex`.
|
|
816
|
+
* - `string` converts into readable `Duplex`.
|
|
817
|
+
* - `ArrayBuffer` converts into readable `Duplex`.
|
|
818
|
+
* - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
|
|
819
|
+
* - `AsyncGeneratorFunction` converts into a readable/writable transform
|
|
820
|
+
* `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
|
|
821
|
+
* `null`.
|
|
822
|
+
* - `AsyncFunction` converts into a writable `Duplex`. Must return
|
|
823
|
+
* either `null` or `undefined`
|
|
824
|
+
* - `Object ({ writable, readable })` converts `readable` and
|
|
825
|
+
* `writable` into `Stream` and then combines them into `Duplex` where the
|
|
826
|
+
* `Duplex` will write to the `writable` and read from the `readable`.
|
|
827
|
+
* - `Promise` converts into readable `Duplex`. Value `null` is ignored.
|
|
828
|
+
*
|
|
829
|
+
* @since v16.8.0
|
|
830
|
+
*/
|
|
831
|
+
static from(src: Stream | Blob | ArrayBuffer | string | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | Object): Duplex;
|
|
795
832
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
796
833
|
_writev?(
|
|
797
834
|
chunks: Array<{
|
node/url.d.ts
CHANGED
|
@@ -684,7 +684,7 @@ declare module 'url' {
|
|
|
684
684
|
* @since v7.5.0, v6.13.0
|
|
685
685
|
*/
|
|
686
686
|
class URLSearchParams implements Iterable<[string, string]> {
|
|
687
|
-
constructor(init?: URLSearchParams | string |
|
|
687
|
+
constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
|
|
688
688
|
/**
|
|
689
689
|
* Append a new name-value pair to the query string.
|
|
690
690
|
*/
|
node/util.d.ts
CHANGED
|
@@ -141,6 +141,14 @@ declare module 'util' {
|
|
|
141
141
|
* @deprecated Since v6.0.0 - Use a third party module instead.
|
|
142
142
|
*/
|
|
143
143
|
export function log(string: string): void;
|
|
144
|
+
/**
|
|
145
|
+
* Returns the `string` after replacing any surrogate code points
|
|
146
|
+
* (or equivalently, any unpaired surrogate code units) with the
|
|
147
|
+
* Unicode "replacement character" U+FFFD.
|
|
148
|
+
*
|
|
149
|
+
* @since v16.8.0
|
|
150
|
+
*/
|
|
151
|
+
export function toUSVString(string: string): string;
|
|
144
152
|
/**
|
|
145
153
|
* The `util.inspect()` method returns a string representation of `object` that is
|
|
146
154
|
* intended for debugging. The output of `util.inspect` may change at any time
|