@types/node 14.18.5 → 14.18.9

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 v14.18/README.md CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v14.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 04 Jan 2022 18:31:34 GMT
11
+ * Last updated: Wed, 19 Jan 2022 07:31:23 GMT
12
12
  * Dependencies: none
13
- * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
13
+ * Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
15
15
  # Credits
16
- These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [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), [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), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [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), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [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), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [Bond](https://github.com/bondz), and [Linus Unnebäck](https://github.com/LinusU).
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [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), [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), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [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), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [Bond](https://github.com/bondz), and [Linus Unnebäck](https://github.com/LinusU).
node v14.18/buffer.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  declare module 'buffer' {
2
+ import { BinaryLike } from 'node:crypto';
2
3
  export const INSPECT_MAX_BYTES: number;
3
4
  export const kMaxLength: number;
4
5
  export const kStringMaxLength: number;
@@ -17,6 +18,69 @@ declare module 'buffer' {
17
18
  new(size: number): Buffer;
18
19
  prototype: Buffer;
19
20
  };
21
+ /**
22
+ * @experimental
23
+ */
24
+ export interface BlobOptions {
25
+ /**
26
+ * @default 'utf8'
27
+ */
28
+ encoding?: BufferEncoding | undefined;
29
+ /**
30
+ * The Blob content-type. The intent is for `type` to convey
31
+ * the MIME media type of the data, however no validation of the type format
32
+ * is performed.
33
+ */
34
+ type?: string | undefined;
35
+ }
36
+ /**
37
+ * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
38
+ * multiple worker threads.
39
+ * @since v14.18.0
40
+ * @experimental
41
+ */
42
+ export class Blob {
43
+ /**
44
+ * The total size of the `Blob` in bytes.
45
+ * @since v14.18.0
46
+ */
47
+ readonly size: number;
48
+ /**
49
+ * The content-type of the `Blob`.
50
+ * @since v14.18.0
51
+ */
52
+ readonly type: string;
53
+ /**
54
+ * Creates a new `Blob` object containing a concatenation of the given sources.
55
+ *
56
+ * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
57
+ * the 'Blob' and can therefore be safely modified after the 'Blob' is created.
58
+ *
59
+ * String sources are also copied into the `Blob`.
60
+ */
61
+ constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
62
+ /**
63
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
64
+ * the `Blob` data.
65
+ * @since v14.18.0
66
+ */
67
+ arrayBuffer(): Promise<ArrayBuffer>;
68
+ /**
69
+ * Creates and returns a new `Blob` containing a subset of this `Blob` objects
70
+ * data. The original `Blob` is not altered.
71
+ * @since v14.18.0
72
+ * @param start The starting index.
73
+ * @param end The ending index.
74
+ * @param type The content-type for the new `Blob`
75
+ */
76
+ slice(start?: number, end?: number, type?: string): Blob;
77
+ /**
78
+ * Returns a promise that fulfills with the contents of the `Blob` decoded as a
79
+ * UTF-8 string.
80
+ * @since v14.18.0
81
+ */
82
+ text(): Promise<string>;
83
+ }
20
84
 
21
85
  export { BuffType as Buffer };
22
86
  }
@@ -75,6 +75,49 @@ type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2"
75
75
 
76
76
  type WithImplicitCoercion<T> = T | { valueOf(): T };
77
77
 
78
+ //#region borrowed
79
+ // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
80
+ /**
81
+ * A controller object that allows you to abort one or more DOM requests as and when desired.
82
+ * @since v14.7.0
83
+ */
84
+ interface AbortController {
85
+ /**
86
+ * Returns the AbortSignal object associated with this object.
87
+ * @since v14.7.0
88
+ */
89
+ readonly signal: AbortSignal;
90
+ /**
91
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
92
+ * @since v14.7.0
93
+ */
94
+ abort(): void;
95
+ }
96
+
97
+ /**
98
+ * A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
99
+ * @since v14.7.0
100
+ */
101
+ interface AbortSignal {
102
+ /**
103
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
104
+ * @since v14.7.0
105
+ */
106
+ readonly aborted: boolean;
107
+ }
108
+
109
+ declare var AbortController: {
110
+ prototype: AbortController;
111
+ new(): AbortController;
112
+ };
113
+
114
+ declare var AbortSignal: {
115
+ prototype: AbortSignal;
116
+ new(): AbortSignal;
117
+ // TODO: Add abort() static
118
+ };
119
+ //#endregion borrowed
120
+
78
121
  /**
79
122
  * Raw data is stored in instances of the Buffer class.
80
123
  * 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.
node v14.18/http.d.ts CHANGED
@@ -279,6 +279,8 @@ declare module 'http' {
279
279
  aborted: boolean;
280
280
  host: string;
281
281
  protocol: string;
282
+ reusedSocket: boolean;
283
+ maxHeadersCount: number;
282
284
 
283
285
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
284
286
 
node v14.18/index.d.ts CHANGED
@@ -35,7 +35,6 @@
35
35
  // Junxiao Shi <https://github.com/yoursunny>
36
36
  // Ilia Baryshnikov <https://github.com/qwelias>
37
37
  // ExE Boss <https://github.com/ExE-Boss>
38
- // Surasak Chaisurin <https://github.com/Ryan-Willpower>
39
38
  // Piotr Błażejewicz <https://github.com/peterblazejewicz>
40
39
  // Anna Henningsen <https://github.com/addaleax>
41
40
  // Victor Perin <https://github.com/victorperin>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.18.5",
3
+ "version": "14.18.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -180,11 +180,6 @@
180
180
  "url": "https://github.com/ExE-Boss",
181
181
  "githubUsername": "ExE-Boss"
182
182
  },
183
- {
184
- "name": "Surasak Chaisurin",
185
- "url": "https://github.com/Ryan-Willpower",
186
- "githubUsername": "Ryan-Willpower"
187
- },
188
183
  {
189
184
  "name": "Piotr Błażejewicz",
190
185
  "url": "https://github.com/peterblazejewicz",
@@ -225,6 +220,6 @@
225
220
  },
226
221
  "scripts": {},
227
222
  "dependencies": {},
228
- "typesPublisherContentHash": "252c75e4415b41c2119a2a09f46387f535c6c18a5d96975c41aefb8ec86e7436",
223
+ "typesPublisherContentHash": "68390c0584f2fc1d1864ae913ab761058bae9ea9aec1dd34a2978d2675a6c31e",
229
224
  "typeScriptVersion": "3.8"
230
225
  }