@types/node 14.0.19 → 14.0.23
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/assert.d.ts +5 -5
- node/buffer.d.ts +3 -241
- node/crypto.d.ts +6 -6
- node/dns.d.ts +1 -1
- node/fs.d.ts +1 -1
- node/globals.d.ts +237 -0
- node/package.json +2 -2
- node/process.d.ts +9 -3
- node/stream.d.ts +1 -0
- node/tls.d.ts +1 -1
- node/ts3.2/base.d.ts +1 -1
- node/ts3.2/globals.d.ts +13 -0
- node/ts3.2/buffer.d.ts +0 -17
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ 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, 13 Jul 2020 16:24:35 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
|
-
* Global values: `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `exports`, `global`, `module`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
13
|
+
* Global values: `Buffer`, `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `exports`, `global`, `module`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
16
|
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alexander T.](https://github.com/a-tarasyuk), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Flarna](https://github.com/Flarna), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nicolas Voigt](https://github.com/octo-sniffle), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), and [Jason Kwok](https://github.com/JasonHK).
|
node/assert.d.ts
CHANGED
|
@@ -19,16 +19,16 @@ declare module "assert" {
|
|
|
19
19
|
type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;
|
|
20
20
|
|
|
21
21
|
function fail(message?: string | Error): never;
|
|
22
|
-
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
22
|
+
/** @deprecated since v10.0.0 - use `fail([message])` or other assert functions instead. */
|
|
23
23
|
function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
|
|
24
24
|
function ok(value: any, message?: string | Error): void;
|
|
25
|
-
/** @deprecated since v9.9.0 - use strictEqual() instead. */
|
|
25
|
+
/** @deprecated since v9.9.0 - use `strictEqual()` instead. */
|
|
26
26
|
function equal(actual: any, expected: any, message?: string | Error): void;
|
|
27
|
-
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
|
|
27
|
+
/** @deprecated since v9.9.0 - use `notStrictEqual()` instead. */
|
|
28
28
|
function notEqual(actual: any, expected: any, message?: string | Error): void;
|
|
29
|
-
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
|
|
29
|
+
/** @deprecated since v9.9.0 - use `deepStrictEqual()` instead. */
|
|
30
30
|
function deepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
31
|
-
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
|
|
31
|
+
/** @deprecated since v9.9.0 - use `notDeepStrictEqual()` instead. */
|
|
32
32
|
function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
|
|
33
33
|
function strictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
34
34
|
function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
node/buffer.d.ts
CHANGED
|
@@ -6,255 +6,17 @@ declare module "buffer" {
|
|
|
6
6
|
MAX_LENGTH: number;
|
|
7
7
|
MAX_STRING_LENGTH: number;
|
|
8
8
|
};
|
|
9
|
+
const BuffType: typeof Buffer;
|
|
9
10
|
|
|
10
11
|
export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
|
|
11
12
|
|
|
12
13
|
export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
|
|
13
14
|
|
|
14
15
|
export const SlowBuffer: {
|
|
15
|
-
/** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */
|
|
16
|
+
/** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
|
|
16
17
|
new(size: number): Buffer;
|
|
17
18
|
prototype: Buffer;
|
|
18
19
|
};
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
// Buffer class
|
|
22
|
-
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Raw data is stored in instances of the Buffer class.
|
|
26
|
-
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
|
|
27
|
-
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
|
28
|
-
*/
|
|
29
|
-
class Buffer extends Uint8Array {
|
|
30
|
-
/**
|
|
31
|
-
* Allocates a new buffer containing the given {str}.
|
|
32
|
-
*
|
|
33
|
-
* @param str String to store in buffer.
|
|
34
|
-
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
35
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
|
|
36
|
-
*/
|
|
37
|
-
constructor(str: string, encoding?: BufferEncoding);
|
|
38
|
-
/**
|
|
39
|
-
* Allocates a new buffer of {size} octets.
|
|
40
|
-
*
|
|
41
|
-
* @param size count of octets to allocate.
|
|
42
|
-
* @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
|
|
43
|
-
*/
|
|
44
|
-
constructor(size: number);
|
|
45
|
-
/**
|
|
46
|
-
* Allocates a new buffer containing the given {array} of octets.
|
|
47
|
-
*
|
|
48
|
-
* @param array The octets to store.
|
|
49
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
50
|
-
*/
|
|
51
|
-
constructor(array: Uint8Array);
|
|
52
|
-
/**
|
|
53
|
-
* Produces a Buffer backed by the same allocated memory as
|
|
54
|
-
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
58
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
59
|
-
*/
|
|
60
|
-
constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer);
|
|
61
|
-
/**
|
|
62
|
-
* Allocates a new buffer containing the given {array} of octets.
|
|
63
|
-
*
|
|
64
|
-
* @param array The octets to store.
|
|
65
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
66
|
-
*/
|
|
67
|
-
constructor(array: any[]);
|
|
68
|
-
/**
|
|
69
|
-
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
70
|
-
*
|
|
71
|
-
* @param buffer The buffer to copy.
|
|
72
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
|
|
73
|
-
*/
|
|
74
|
-
constructor(buffer: Buffer);
|
|
75
|
-
/**
|
|
76
|
-
* When passed a reference to the .buffer property of a TypedArray instance,
|
|
77
|
-
* the newly created Buffer will share the same allocated memory as the TypedArray.
|
|
78
|
-
* The optional {byteOffset} and {length} arguments specify a memory range
|
|
79
|
-
* within the {arrayBuffer} that will be shared by the Buffer.
|
|
80
|
-
*
|
|
81
|
-
* @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
|
|
82
|
-
*/
|
|
83
|
-
static from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
84
|
-
/**
|
|
85
|
-
* Creates a new Buffer using the passed {data}
|
|
86
|
-
* @param data data to create a new Buffer
|
|
87
|
-
*/
|
|
88
|
-
static from(data: number[]): Buffer;
|
|
89
|
-
static from(data: Uint8Array): Buffer;
|
|
90
|
-
/**
|
|
91
|
-
* Creates a new buffer containing the coerced value of an object
|
|
92
|
-
* A `TypeError` will be thrown if {obj} has not mentioned methods or is not of other type appropriate for `Buffer.from()` variants.
|
|
93
|
-
* @param obj An object supporting `Symbol.toPrimitive` or `valueOf()`.
|
|
94
|
-
*/
|
|
95
|
-
static from(obj: { valueOf(): string | object } | { [Symbol.toPrimitive](hint: 'string'): string }, byteOffset?: number, length?: number): Buffer;
|
|
96
|
-
/**
|
|
97
|
-
* Creates a new Buffer containing the given JavaScript string {str}.
|
|
98
|
-
* If provided, the {encoding} parameter identifies the character encoding.
|
|
99
|
-
* If not provided, {encoding} defaults to 'utf8'.
|
|
100
|
-
*/
|
|
101
|
-
static from(str: string, encoding?: BufferEncoding): Buffer;
|
|
102
|
-
/**
|
|
103
|
-
* Creates a new Buffer using the passed {data}
|
|
104
|
-
* @param values to create a new Buffer
|
|
105
|
-
*/
|
|
106
|
-
static of(...items: number[]): Buffer;
|
|
107
|
-
/**
|
|
108
|
-
* Returns true if {obj} is a Buffer
|
|
109
|
-
*
|
|
110
|
-
* @param obj object to test.
|
|
111
|
-
*/
|
|
112
|
-
static isBuffer(obj: any): obj is Buffer;
|
|
113
|
-
/**
|
|
114
|
-
* Returns true if {encoding} is a valid encoding argument.
|
|
115
|
-
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
|
116
|
-
*
|
|
117
|
-
* @param encoding string to test.
|
|
118
|
-
*/
|
|
119
|
-
static isEncoding(encoding: string): encoding is BufferEncoding;
|
|
120
|
-
/**
|
|
121
|
-
* Gives the actual byte length of a string. encoding defaults to 'utf8'.
|
|
122
|
-
* This is not the same as String.prototype.length since that returns the number of characters in a string.
|
|
123
|
-
*
|
|
124
|
-
* @param string string to test.
|
|
125
|
-
* @param encoding encoding used to evaluate (defaults to 'utf8')
|
|
126
|
-
*/
|
|
127
|
-
static byteLength(
|
|
128
|
-
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
129
|
-
encoding?: BufferEncoding
|
|
130
|
-
): number;
|
|
131
|
-
/**
|
|
132
|
-
* Returns a buffer which is the result of concatenating all the buffers in the list together.
|
|
133
|
-
*
|
|
134
|
-
* If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
|
|
135
|
-
* If the list has exactly one item, then the first item of the list is returned.
|
|
136
|
-
* If the list has more than one item, then a new Buffer is created.
|
|
137
|
-
*
|
|
138
|
-
* @param list An array of Buffer objects to concatenate
|
|
139
|
-
* @param totalLength Total length of the buffers when concatenated.
|
|
140
|
-
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
|
|
141
|
-
*/
|
|
142
|
-
static concat(list: Uint8Array[], totalLength?: number): Buffer;
|
|
143
|
-
/**
|
|
144
|
-
* The same as buf1.compare(buf2).
|
|
145
|
-
*/
|
|
146
|
-
static compare(buf1: Uint8Array, buf2: Uint8Array): number;
|
|
147
|
-
/**
|
|
148
|
-
* Allocates a new buffer of {size} octets.
|
|
149
|
-
*
|
|
150
|
-
* @param size count of octets to allocate.
|
|
151
|
-
* @param fill if specified, buffer will be initialized by calling buf.fill(fill).
|
|
152
|
-
* If parameter is omitted, buffer will be filled with zeros.
|
|
153
|
-
* @param encoding encoding used for call to buf.fill while initalizing
|
|
154
|
-
*/
|
|
155
|
-
static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
|
|
156
|
-
/**
|
|
157
|
-
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
|
|
158
|
-
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
159
|
-
*
|
|
160
|
-
* @param size count of octets to allocate
|
|
161
|
-
*/
|
|
162
|
-
static allocUnsafe(size: number): Buffer;
|
|
163
|
-
/**
|
|
164
|
-
* Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
|
|
165
|
-
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
166
|
-
*
|
|
167
|
-
* @param size count of octets to allocate
|
|
168
|
-
*/
|
|
169
|
-
static allocUnsafeSlow(size: number): Buffer;
|
|
170
|
-
/**
|
|
171
|
-
* This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
|
|
172
|
-
*/
|
|
173
|
-
static poolSize: number;
|
|
174
|
-
|
|
175
|
-
write(string: string, encoding?: BufferEncoding): number;
|
|
176
|
-
write(string: string, offset: number, encoding?: BufferEncoding): number;
|
|
177
|
-
write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
|
|
178
|
-
toString(encoding?: BufferEncoding, start?: number, end?: number): string;
|
|
179
|
-
toJSON(): { type: 'Buffer'; data: number[] };
|
|
180
|
-
equals(otherBuffer: Uint8Array): boolean;
|
|
181
|
-
compare(
|
|
182
|
-
otherBuffer: Uint8Array,
|
|
183
|
-
targetStart?: number,
|
|
184
|
-
targetEnd?: number,
|
|
185
|
-
sourceStart?: number,
|
|
186
|
-
sourceEnd?: number
|
|
187
|
-
): number;
|
|
188
|
-
copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
189
|
-
/**
|
|
190
|
-
* Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
|
|
191
|
-
*
|
|
192
|
-
* This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory.
|
|
193
|
-
*
|
|
194
|
-
* @param begin Where the new `Buffer` will start. Default: `0`.
|
|
195
|
-
* @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
|
|
196
|
-
*/
|
|
197
|
-
slice(begin?: number, end?: number): Buffer;
|
|
198
|
-
/**
|
|
199
|
-
* Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
|
|
200
|
-
*
|
|
201
|
-
* This method is compatible with `Uint8Array#subarray()`.
|
|
202
|
-
*
|
|
203
|
-
* @param begin Where the new `Buffer` will start. Default: `0`.
|
|
204
|
-
* @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
|
|
205
|
-
*/
|
|
206
|
-
subarray(begin?: number, end?: number): Buffer;
|
|
207
|
-
writeUIntLE(value: number, offset: number, byteLength: number): number;
|
|
208
|
-
writeUIntBE(value: number, offset: number, byteLength: number): number;
|
|
209
|
-
writeIntLE(value: number, offset: number, byteLength: number): number;
|
|
210
|
-
writeIntBE(value: number, offset: number, byteLength: number): number;
|
|
211
|
-
readUIntLE(offset: number, byteLength: number): number;
|
|
212
|
-
readUIntBE(offset: number, byteLength: number): number;
|
|
213
|
-
readIntLE(offset: number, byteLength: number): number;
|
|
214
|
-
readIntBE(offset: number, byteLength: number): number;
|
|
215
|
-
readUInt8(offset?: number): number;
|
|
216
|
-
readUInt16LE(offset?: number): number;
|
|
217
|
-
readUInt16BE(offset?: number): number;
|
|
218
|
-
readUInt32LE(offset?: number): number;
|
|
219
|
-
readUInt32BE(offset?: number): number;
|
|
220
|
-
readInt8(offset?: number): number;
|
|
221
|
-
readInt16LE(offset?: number): number;
|
|
222
|
-
readInt16BE(offset?: number): number;
|
|
223
|
-
readInt32LE(offset?: number): number;
|
|
224
|
-
readInt32BE(offset?: number): number;
|
|
225
|
-
readFloatLE(offset?: number): number;
|
|
226
|
-
readFloatBE(offset?: number): number;
|
|
227
|
-
readDoubleLE(offset?: number): number;
|
|
228
|
-
readDoubleBE(offset?: number): number;
|
|
229
|
-
reverse(): this;
|
|
230
|
-
swap16(): Buffer;
|
|
231
|
-
swap32(): Buffer;
|
|
232
|
-
swap64(): Buffer;
|
|
233
|
-
writeUInt8(value: number, offset?: number): number;
|
|
234
|
-
writeUInt16LE(value: number, offset?: number): number;
|
|
235
|
-
writeUInt16BE(value: number, offset?: number): number;
|
|
236
|
-
writeUInt32LE(value: number, offset?: number): number;
|
|
237
|
-
writeUInt32BE(value: number, offset?: number): number;
|
|
238
|
-
writeInt8(value: number, offset?: number): number;
|
|
239
|
-
writeInt16LE(value: number, offset?: number): number;
|
|
240
|
-
writeInt16BE(value: number, offset?: number): number;
|
|
241
|
-
writeInt32LE(value: number, offset?: number): number;
|
|
242
|
-
writeInt32BE(value: number, offset?: number): number;
|
|
243
|
-
writeFloatLE(value: number, offset?: number): number;
|
|
244
|
-
writeFloatBE(value: number, offset?: number): number;
|
|
245
|
-
writeDoubleLE(value: number, offset?: number): number;
|
|
246
|
-
writeDoubleBE(value: number, offset?: number): number;
|
|
247
|
-
|
|
248
|
-
fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
|
|
249
|
-
|
|
250
|
-
indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
|
|
251
|
-
lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
|
|
252
|
-
entries(): IterableIterator<[number, number]>;
|
|
253
|
-
includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
|
|
254
|
-
keys(): IterableIterator<number>;
|
|
255
|
-
values(): IterableIterator<number>;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export { Buffer };
|
|
21
|
+
export { BuffType as Buffer };
|
|
260
22
|
}
|
node/crypto.d.ts
CHANGED
|
@@ -178,11 +178,11 @@ declare module "crypto" {
|
|
|
178
178
|
interface CipherGCMOptions extends stream.TransformOptions {
|
|
179
179
|
authTagLength?: number;
|
|
180
180
|
}
|
|
181
|
-
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
181
|
+
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
182
182
|
function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
|
|
183
|
-
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
183
|
+
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
184
184
|
function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
|
|
185
|
-
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
185
|
+
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
186
186
|
function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
|
|
187
187
|
|
|
188
188
|
function createCipheriv(
|
|
@@ -221,11 +221,11 @@ declare module "crypto" {
|
|
|
221
221
|
setAAD(buffer: Buffer, options?: { plaintextLength: number }): this;
|
|
222
222
|
getAuthTag(): Buffer;
|
|
223
223
|
}
|
|
224
|
-
/** @deprecated since v10.0.0 use createDecipheriv() */
|
|
224
|
+
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
225
225
|
function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
|
|
226
|
-
/** @deprecated since v10.0.0 use createDecipheriv() */
|
|
226
|
+
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
227
227
|
function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
|
|
228
|
-
/** @deprecated since v10.0.0 use createDecipheriv() */
|
|
228
|
+
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
229
229
|
function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
|
|
230
230
|
|
|
231
231
|
function createDecipheriv(
|
node/dns.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare module "dns" {
|
|
|
60
60
|
ttl: number;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
/** @deprecated Use AnyARecord or AnyAaaaRecord instead. */
|
|
63
|
+
/** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
|
|
64
64
|
type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
|
65
65
|
|
|
66
66
|
interface AnyARecord extends RecordWithTtl {
|
node/fs.d.ts
CHANGED
|
@@ -1727,7 +1727,7 @@ declare module "fs" {
|
|
|
1727
1727
|
|
|
1728
1728
|
/**
|
|
1729
1729
|
* Asynchronously tests whether or not the given path exists by checking with the file system.
|
|
1730
|
-
* @deprecated
|
|
1730
|
+
* @deprecated since v1.0.0 Use `fs.stat()` or `fs.access()` instead
|
|
1731
1731
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
1732
1732
|
* URL support is _experimental_.
|
|
1733
1733
|
*/
|
node/globals.d.ts
CHANGED
|
@@ -62,6 +62,243 @@ declare var module: NodeModule;
|
|
|
62
62
|
// Same as module.exports
|
|
63
63
|
declare var exports: any;
|
|
64
64
|
|
|
65
|
+
// Buffer class
|
|
66
|
+
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Raw data is stored in instances of the Buffer class.
|
|
70
|
+
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
|
|
71
|
+
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
|
72
|
+
*/
|
|
73
|
+
declare class Buffer extends Uint8Array {
|
|
74
|
+
/**
|
|
75
|
+
* Allocates a new buffer containing the given {str}.
|
|
76
|
+
*
|
|
77
|
+
* @param str String to store in buffer.
|
|
78
|
+
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
79
|
+
* @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
|
|
80
|
+
*/
|
|
81
|
+
constructor(str: string, encoding?: BufferEncoding);
|
|
82
|
+
/**
|
|
83
|
+
* Allocates a new buffer of {size} octets.
|
|
84
|
+
*
|
|
85
|
+
* @param size count of octets to allocate.
|
|
86
|
+
* @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
|
|
87
|
+
*/
|
|
88
|
+
constructor(size: number);
|
|
89
|
+
/**
|
|
90
|
+
* Allocates a new buffer containing the given {array} of octets.
|
|
91
|
+
*
|
|
92
|
+
* @param array The octets to store.
|
|
93
|
+
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
94
|
+
*/
|
|
95
|
+
constructor(array: Uint8Array);
|
|
96
|
+
/**
|
|
97
|
+
* Produces a Buffer backed by the same allocated memory as
|
|
98
|
+
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
99
|
+
*
|
|
100
|
+
*
|
|
101
|
+
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
102
|
+
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
103
|
+
*/
|
|
104
|
+
constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer);
|
|
105
|
+
/**
|
|
106
|
+
* Allocates a new buffer containing the given {array} of octets.
|
|
107
|
+
*
|
|
108
|
+
* @param array The octets to store.
|
|
109
|
+
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
110
|
+
*/
|
|
111
|
+
constructor(array: any[]);
|
|
112
|
+
/**
|
|
113
|
+
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
114
|
+
*
|
|
115
|
+
* @param buffer The buffer to copy.
|
|
116
|
+
* @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
|
|
117
|
+
*/
|
|
118
|
+
constructor(buffer: Buffer);
|
|
119
|
+
/**
|
|
120
|
+
* When passed a reference to the .buffer property of a TypedArray instance,
|
|
121
|
+
* the newly created Buffer will share the same allocated memory as the TypedArray.
|
|
122
|
+
* The optional {byteOffset} and {length} arguments specify a memory range
|
|
123
|
+
* within the {arrayBuffer} that will be shared by the Buffer.
|
|
124
|
+
*
|
|
125
|
+
* @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
|
|
126
|
+
*/
|
|
127
|
+
static from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
128
|
+
/**
|
|
129
|
+
* Creates a new Buffer using the passed {data}
|
|
130
|
+
* @param data data to create a new Buffer
|
|
131
|
+
*/
|
|
132
|
+
static from(data: number[]): Buffer;
|
|
133
|
+
static from(data: Uint8Array): Buffer;
|
|
134
|
+
/**
|
|
135
|
+
* Creates a new buffer containing the coerced value of an object
|
|
136
|
+
* A `TypeError` will be thrown if {obj} has not mentioned methods or is not of other type appropriate for `Buffer.from()` variants.
|
|
137
|
+
* @param obj An object supporting `Symbol.toPrimitive` or `valueOf()`.
|
|
138
|
+
*/
|
|
139
|
+
static from(obj: { valueOf(): string | object } | { [Symbol.toPrimitive](hint: 'string'): string }, byteOffset?: number, length?: number): Buffer;
|
|
140
|
+
/**
|
|
141
|
+
* Creates a new Buffer containing the given JavaScript string {str}.
|
|
142
|
+
* If provided, the {encoding} parameter identifies the character encoding.
|
|
143
|
+
* If not provided, {encoding} defaults to 'utf8'.
|
|
144
|
+
*/
|
|
145
|
+
static from(str: string, encoding?: BufferEncoding): Buffer;
|
|
146
|
+
/**
|
|
147
|
+
* Creates a new Buffer using the passed {data}
|
|
148
|
+
* @param values to create a new Buffer
|
|
149
|
+
*/
|
|
150
|
+
static of(...items: number[]): Buffer;
|
|
151
|
+
/**
|
|
152
|
+
* Returns true if {obj} is a Buffer
|
|
153
|
+
*
|
|
154
|
+
* @param obj object to test.
|
|
155
|
+
*/
|
|
156
|
+
static isBuffer(obj: any): obj is Buffer;
|
|
157
|
+
/**
|
|
158
|
+
* Returns true if {encoding} is a valid encoding argument.
|
|
159
|
+
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
|
|
160
|
+
*
|
|
161
|
+
* @param encoding string to test.
|
|
162
|
+
*/
|
|
163
|
+
static isEncoding(encoding: string): encoding is BufferEncoding;
|
|
164
|
+
/**
|
|
165
|
+
* Gives the actual byte length of a string. encoding defaults to 'utf8'.
|
|
166
|
+
* This is not the same as String.prototype.length since that returns the number of characters in a string.
|
|
167
|
+
*
|
|
168
|
+
* @param string string to test.
|
|
169
|
+
* @param encoding encoding used to evaluate (defaults to 'utf8')
|
|
170
|
+
*/
|
|
171
|
+
static byteLength(
|
|
172
|
+
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
173
|
+
encoding?: BufferEncoding
|
|
174
|
+
): number;
|
|
175
|
+
/**
|
|
176
|
+
* Returns a buffer which is the result of concatenating all the buffers in the list together.
|
|
177
|
+
*
|
|
178
|
+
* If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
|
|
179
|
+
* If the list has exactly one item, then the first item of the list is returned.
|
|
180
|
+
* If the list has more than one item, then a new Buffer is created.
|
|
181
|
+
*
|
|
182
|
+
* @param list An array of Buffer objects to concatenate
|
|
183
|
+
* @param totalLength Total length of the buffers when concatenated.
|
|
184
|
+
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
|
|
185
|
+
*/
|
|
186
|
+
static concat(list: Uint8Array[], totalLength?: number): Buffer;
|
|
187
|
+
/**
|
|
188
|
+
* The same as buf1.compare(buf2).
|
|
189
|
+
*/
|
|
190
|
+
static compare(buf1: Uint8Array, buf2: Uint8Array): number;
|
|
191
|
+
/**
|
|
192
|
+
* Allocates a new buffer of {size} octets.
|
|
193
|
+
*
|
|
194
|
+
* @param size count of octets to allocate.
|
|
195
|
+
* @param fill if specified, buffer will be initialized by calling buf.fill(fill).
|
|
196
|
+
* If parameter is omitted, buffer will be filled with zeros.
|
|
197
|
+
* @param encoding encoding used for call to buf.fill while initalizing
|
|
198
|
+
*/
|
|
199
|
+
static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
|
|
200
|
+
/**
|
|
201
|
+
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
|
|
202
|
+
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
203
|
+
*
|
|
204
|
+
* @param size count of octets to allocate
|
|
205
|
+
*/
|
|
206
|
+
static allocUnsafe(size: number): Buffer;
|
|
207
|
+
/**
|
|
208
|
+
* Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
|
|
209
|
+
* of the newly created Buffer are unknown and may contain sensitive data.
|
|
210
|
+
*
|
|
211
|
+
* @param size count of octets to allocate
|
|
212
|
+
*/
|
|
213
|
+
static allocUnsafeSlow(size: number): Buffer;
|
|
214
|
+
/**
|
|
215
|
+
* This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
|
|
216
|
+
*/
|
|
217
|
+
static poolSize: number;
|
|
218
|
+
|
|
219
|
+
write(string: string, encoding?: BufferEncoding): number;
|
|
220
|
+
write(string: string, offset: number, encoding?: BufferEncoding): number;
|
|
221
|
+
write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
|
|
222
|
+
toString(encoding?: BufferEncoding, start?: number, end?: number): string;
|
|
223
|
+
toJSON(): { type: 'Buffer'; data: number[] };
|
|
224
|
+
equals(otherBuffer: Uint8Array): boolean;
|
|
225
|
+
compare(
|
|
226
|
+
otherBuffer: Uint8Array,
|
|
227
|
+
targetStart?: number,
|
|
228
|
+
targetEnd?: number,
|
|
229
|
+
sourceStart?: number,
|
|
230
|
+
sourceEnd?: number
|
|
231
|
+
): number;
|
|
232
|
+
copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
233
|
+
/**
|
|
234
|
+
* Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
|
|
235
|
+
*
|
|
236
|
+
* This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory.
|
|
237
|
+
*
|
|
238
|
+
* @param begin Where the new `Buffer` will start. Default: `0`.
|
|
239
|
+
* @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
|
|
240
|
+
*/
|
|
241
|
+
slice(begin?: number, end?: number): Buffer;
|
|
242
|
+
/**
|
|
243
|
+
* Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
|
|
244
|
+
*
|
|
245
|
+
* This method is compatible with `Uint8Array#subarray()`.
|
|
246
|
+
*
|
|
247
|
+
* @param begin Where the new `Buffer` will start. Default: `0`.
|
|
248
|
+
* @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
|
|
249
|
+
*/
|
|
250
|
+
subarray(begin?: number, end?: number): Buffer;
|
|
251
|
+
writeUIntLE(value: number, offset: number, byteLength: number): number;
|
|
252
|
+
writeUIntBE(value: number, offset: number, byteLength: number): number;
|
|
253
|
+
writeIntLE(value: number, offset: number, byteLength: number): number;
|
|
254
|
+
writeIntBE(value: number, offset: number, byteLength: number): number;
|
|
255
|
+
readUIntLE(offset: number, byteLength: number): number;
|
|
256
|
+
readUIntBE(offset: number, byteLength: number): number;
|
|
257
|
+
readIntLE(offset: number, byteLength: number): number;
|
|
258
|
+
readIntBE(offset: number, byteLength: number): number;
|
|
259
|
+
readUInt8(offset?: number): number;
|
|
260
|
+
readUInt16LE(offset?: number): number;
|
|
261
|
+
readUInt16BE(offset?: number): number;
|
|
262
|
+
readUInt32LE(offset?: number): number;
|
|
263
|
+
readUInt32BE(offset?: number): number;
|
|
264
|
+
readInt8(offset?: number): number;
|
|
265
|
+
readInt16LE(offset?: number): number;
|
|
266
|
+
readInt16BE(offset?: number): number;
|
|
267
|
+
readInt32LE(offset?: number): number;
|
|
268
|
+
readInt32BE(offset?: number): number;
|
|
269
|
+
readFloatLE(offset?: number): number;
|
|
270
|
+
readFloatBE(offset?: number): number;
|
|
271
|
+
readDoubleLE(offset?: number): number;
|
|
272
|
+
readDoubleBE(offset?: number): number;
|
|
273
|
+
reverse(): this;
|
|
274
|
+
swap16(): Buffer;
|
|
275
|
+
swap32(): Buffer;
|
|
276
|
+
swap64(): Buffer;
|
|
277
|
+
writeUInt8(value: number, offset?: number): number;
|
|
278
|
+
writeUInt16LE(value: number, offset?: number): number;
|
|
279
|
+
writeUInt16BE(value: number, offset?: number): number;
|
|
280
|
+
writeUInt32LE(value: number, offset?: number): number;
|
|
281
|
+
writeUInt32BE(value: number, offset?: number): number;
|
|
282
|
+
writeInt8(value: number, offset?: number): number;
|
|
283
|
+
writeInt16LE(value: number, offset?: number): number;
|
|
284
|
+
writeInt16BE(value: number, offset?: number): number;
|
|
285
|
+
writeInt32LE(value: number, offset?: number): number;
|
|
286
|
+
writeInt32BE(value: number, offset?: number): number;
|
|
287
|
+
writeFloatLE(value: number, offset?: number): number;
|
|
288
|
+
writeFloatBE(value: number, offset?: number): number;
|
|
289
|
+
writeDoubleLE(value: number, offset?: number): number;
|
|
290
|
+
writeDoubleBE(value: number, offset?: number): number;
|
|
291
|
+
|
|
292
|
+
fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
|
|
293
|
+
|
|
294
|
+
indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
|
|
295
|
+
lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
|
|
296
|
+
entries(): IterableIterator<[number, number]>;
|
|
297
|
+
includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
|
|
298
|
+
keys(): IterableIterator<number>;
|
|
299
|
+
values(): IterableIterator<number>;
|
|
300
|
+
}
|
|
301
|
+
|
|
65
302
|
/*----------------------------------------------*
|
|
66
303
|
* *
|
|
67
304
|
* GLOBAL INTERFACES *
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.23",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -251,6 +251,6 @@
|
|
|
251
251
|
},
|
|
252
252
|
"scripts": {},
|
|
253
253
|
"dependencies": {},
|
|
254
|
-
"typesPublisherContentHash": "
|
|
254
|
+
"typesPublisherContentHash": "804cf921ce926d59cd60cf46be4e11bfc4fcb82f51e61daec706fb27bd4db0ba",
|
|
255
255
|
"typeScriptVersion": "3.0"
|
|
256
256
|
}
|
node/process.d.ts
CHANGED
|
@@ -174,12 +174,18 @@ declare module "process" {
|
|
|
174
174
|
/**
|
|
175
175
|
* Can also be a tty.WriteStream, not typed due to limitations.
|
|
176
176
|
*/
|
|
177
|
-
stdout: WriteStream
|
|
177
|
+
stdout: WriteStream & {
|
|
178
|
+
fd: 1;
|
|
179
|
+
};
|
|
178
180
|
/**
|
|
179
181
|
* Can also be a tty.WriteStream, not typed due to limitations.
|
|
180
182
|
*/
|
|
181
|
-
stderr: WriteStream
|
|
182
|
-
|
|
183
|
+
stderr: WriteStream & {
|
|
184
|
+
fd: 2;
|
|
185
|
+
};
|
|
186
|
+
stdin: ReadStream & {
|
|
187
|
+
fd: 0;
|
|
188
|
+
};
|
|
183
189
|
openStdin(): Socket;
|
|
184
190
|
argv: string[];
|
|
185
191
|
argv0: string;
|
node/stream.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare module "stream" {
|
|
|
28
28
|
readable: boolean;
|
|
29
29
|
readonly readableEncoding: BufferEncoding | null;
|
|
30
30
|
readonly readableEnded: boolean;
|
|
31
|
+
readonly readableFlowing: boolean | null;
|
|
31
32
|
readonly readableHighWaterMark: number;
|
|
32
33
|
readonly readableLength: number;
|
|
33
34
|
readonly readableObjectMode: boolean;
|
node/tls.d.ts
CHANGED
|
@@ -726,7 +726,7 @@ declare module "tls" {
|
|
|
726
726
|
function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
|
727
727
|
function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
|
728
728
|
/**
|
|
729
|
-
* @deprecated
|
|
729
|
+
* @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
|
|
730
730
|
*/
|
|
731
731
|
function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
|
|
732
732
|
function createSecureContext(details: SecureContextOptions): SecureContext;
|
node/ts3.2/base.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/// <reference path="../base.d.ts" />
|
|
18
18
|
|
|
19
19
|
// TypeScript 3.2-specific augmentations:
|
|
20
|
-
/// <reference path="buffer.d.ts" />
|
|
21
20
|
/// <reference path="fs.d.ts" />
|
|
22
21
|
/// <reference path="process.d.ts" />
|
|
23
22
|
/// <reference path="util.d.ts" />
|
|
23
|
+
/// <reference path="globals.d.ts" />
|
node/ts3.2/globals.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// tslint:disable-next-line:no-bad-reference
|
|
2
|
+
/// <reference path="../globals.d.ts" />
|
|
3
|
+
|
|
4
|
+
interface Buffer extends Uint8Array {
|
|
5
|
+
readBigUInt64BE(offset?: number): bigint;
|
|
6
|
+
readBigUInt64LE(offset?: number): bigint;
|
|
7
|
+
readBigInt64BE(offset?: number): bigint;
|
|
8
|
+
readBigInt64LE(offset?: number): bigint;
|
|
9
|
+
writeBigInt64BE(value: bigint, offset?: number): number;
|
|
10
|
+
writeBigInt64LE(value: bigint, offset?: number): number;
|
|
11
|
+
writeBigUInt64BE(value: bigint, offset?: number): number;
|
|
12
|
+
writeBigUInt64LE(value: bigint, offset?: number): number;
|
|
13
|
+
}
|
node/ts3.2/buffer.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// tslint:disable-next-line:no-bad-reference
|
|
2
|
-
/// <reference path="../buffer.d.ts" />
|
|
3
|
-
|
|
4
|
-
declare module 'buffer' {
|
|
5
|
-
global {
|
|
6
|
-
interface Buffer extends Uint8Array {
|
|
7
|
-
readBigUInt64BE(offset?: number): bigint;
|
|
8
|
-
readBigUInt64LE(offset?: number): bigint;
|
|
9
|
-
readBigInt64BE(offset?: number): bigint;
|
|
10
|
-
readBigInt64LE(offset?: number): bigint;
|
|
11
|
-
writeBigInt64BE(value: bigint, offset?: number): number;
|
|
12
|
-
writeBigInt64LE(value: bigint, offset?: number): number;
|
|
13
|
-
writeBigUInt64BE(value: bigint, offset?: number): number;
|
|
14
|
-
writeBigUInt64LE(value: bigint, offset?: number): number;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|