@types/node 18.14.1 → 18.14.3

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 CHANGED
@@ -8,7 +8,7 @@ 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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 23 Feb 2023 11:02:31 GMT
11
+ * Last updated: Thu, 02 Mar 2023 04:32:38 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node/buffer.d.ts CHANGED
@@ -164,6 +164,35 @@ declare module 'buffer' {
164
164
  */
165
165
  stream(): WebReadableStream;
166
166
  }
167
+ export interface FileOptions {
168
+ /**
169
+ * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
170
+ * converted to the platform native line-ending as specified by `require('node:os').EOL`.
171
+ */
172
+ endings?: 'native' | 'transparent';
173
+ /** The File content-type. */
174
+ type?: string;
175
+ /** The last modified date of the file. `Default`: Date.now(). */
176
+ lastModified?: number;
177
+ }
178
+ /**
179
+ * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
180
+ * @experimental
181
+ * @since v18.13.0
182
+ */
183
+ export class File extends Blob {
184
+ constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
185
+ /**
186
+ * The name of the `File`.
187
+ * @since v18.13.0
188
+ */
189
+ readonly name: string;
190
+ /**
191
+ * The last modified date of the `File`.
192
+ * @since v18.13.0
193
+ */
194
+ readonly lastModified: number;
195
+ }
167
196
  export import atob = globalThis.atob;
168
197
  export import btoa = globalThis.btoa;
169
198
 
node/crypto.d.ts CHANGED
@@ -1190,11 +1190,13 @@ declare module 'crypto' {
1190
1190
  format?: KeyFormat | undefined;
1191
1191
  type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
1192
1192
  passphrase?: string | Buffer | undefined;
1193
+ encoding?: string | undefined;
1193
1194
  }
1194
1195
  interface PublicKeyInput {
1195
1196
  key: string | Buffer;
1196
1197
  format?: KeyFormat | undefined;
1197
1198
  type?: 'pkcs1' | 'spki' | undefined;
1199
+ encoding?: string | undefined;
1198
1200
  }
1199
1201
  /**
1200
1202
  * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
node/net.d.ts CHANGED
@@ -269,6 +269,12 @@ declare module 'net' {
269
269
  * @since v6.1.0
270
270
  */
271
271
  readonly connecting: boolean;
272
+ /**
273
+ * This is `true` if the socket is not connected yet, either because `.connect()`
274
+ * has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
275
+ * @since v10.16.0
276
+ */
277
+ readonly pending: boolean;
272
278
  /**
273
279
  * See `writable.destroyed` for further details.
274
280
  */
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.14.1",
3
+ "version": "18.14.3",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "4b700d8e69578ec73360139a785868405bb684e4fe62cd395573dccfde90213e",
235
+ "typesPublisherContentHash": "0498c0796310ac23c2299d02924a03db57cc80fd79907a0dfedf78cae5ab32e5",
236
236
  "typeScriptVersion": "4.2"
237
237
  }
node/ts4.8/buffer.d.ts CHANGED
@@ -164,6 +164,35 @@ declare module 'buffer' {
164
164
  */
165
165
  stream(): WebReadableStream;
166
166
  }
167
+ export interface FileOptions {
168
+ /**
169
+ * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
170
+ * converted to the platform native line-ending as specified by `require('node:os').EOL`.
171
+ */
172
+ endings?: 'native' | 'transparent';
173
+ /** The File content-type. */
174
+ type?: string;
175
+ /** The last modified date of the file. `Default`: Date.now(). */
176
+ lastModified?: number;
177
+ }
178
+ /**
179
+ * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
180
+ * @experimental
181
+ * @since v18.13.0
182
+ */
183
+ export class File extends Blob {
184
+ constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
185
+ /**
186
+ * The name of the `File`.
187
+ * @since v18.13.0
188
+ */
189
+ readonly name: string;
190
+ /**
191
+ * The last modified date of the `File`.
192
+ * @since v18.13.0
193
+ */
194
+ readonly lastModified: number;
195
+ }
167
196
  export import atob = globalThis.atob;
168
197
  export import btoa = globalThis.btoa;
169
198
 
node/ts4.8/crypto.d.ts CHANGED
@@ -1190,11 +1190,13 @@ declare module 'crypto' {
1190
1190
  format?: KeyFormat | undefined;
1191
1191
  type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
1192
1192
  passphrase?: string | Buffer | undefined;
1193
+ encoding?: string | undefined;
1193
1194
  }
1194
1195
  interface PublicKeyInput {
1195
1196
  key: string | Buffer;
1196
1197
  format?: KeyFormat | undefined;
1197
1198
  type?: 'pkcs1' | 'spki' | undefined;
1199
+ encoding?: string | undefined;
1198
1200
  }
1199
1201
  /**
1200
1202
  * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
node/ts4.8/net.d.ts CHANGED
@@ -290,6 +290,12 @@ declare module 'net' {
290
290
  * @since v18.8.0
291
291
  */
292
292
  readonly localFamily?: string;
293
+ /**
294
+ * This is `true` if the socket is not connected yet, either because `.connect()`
295
+ * has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
296
+ * @since v10.16.0
297
+ */
298
+ readonly pending: boolean;
293
299
  /**
294
300
  * This property represents the state of the connection as a string.
295
301
  * @see {https://nodejs.org/api/net.html#socketreadystate}