@types/node 18.14.1 → 18.14.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 +1 -1
- node/buffer.d.ts +29 -0
- node/crypto.d.ts +2 -0
- node/package.json +2 -2
- node/ts4.8/buffer.d.ts +29 -0
- node/ts4.8/crypto.d.ts +2 -0
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:
|
|
11
|
+
* Last updated: Sun, 26 Feb 2023 19:32:42 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.14.
|
|
3
|
+
"version": "18.14.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",
|
|
@@ -232,6 +232,6 @@
|
|
|
232
232
|
},
|
|
233
233
|
"scripts": {},
|
|
234
234
|
"dependencies": {},
|
|
235
|
-
"typesPublisherContentHash": "
|
|
235
|
+
"typesPublisherContentHash": "be4d48dfd0dae2496fdfd2ee75ab6892c61b22ebae2e0b3f4552c006a06fb6a4",
|
|
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`.
|