@types/node 17.0.20 → 17.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 +1 -1
- node/fs.d.ts +48 -14
- node/package.json +3 -3
- node/process.d.ts +1 -1
- node/tls.d.ts +1 -1
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: Wed, 23
|
|
11
|
+
* Last updated: Wed, 23 Mar 2022 17:01:45 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node/fs.d.ts
CHANGED
|
@@ -2233,6 +2233,23 @@ declare module 'fs' {
|
|
|
2233
2233
|
*/
|
|
2234
2234
|
export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
|
|
2235
2235
|
export type ReadPosition = number | bigint;
|
|
2236
|
+
export interface ReadSyncOptions {
|
|
2237
|
+
/**
|
|
2238
|
+
* @default 0
|
|
2239
|
+
*/
|
|
2240
|
+
offset?: number | undefined;
|
|
2241
|
+
/**
|
|
2242
|
+
* @default `length of buffer`
|
|
2243
|
+
*/
|
|
2244
|
+
length?: number | undefined;
|
|
2245
|
+
/**
|
|
2246
|
+
* @default null
|
|
2247
|
+
*/
|
|
2248
|
+
position?: ReadPosition | null | undefined;
|
|
2249
|
+
}
|
|
2250
|
+
export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
|
|
2251
|
+
buffer?: TBuffer;
|
|
2252
|
+
}
|
|
2236
2253
|
/**
|
|
2237
2254
|
* Read data from the file specified by `fd`.
|
|
2238
2255
|
*
|
|
@@ -2258,6 +2275,24 @@ declare module 'fs' {
|
|
|
2258
2275
|
position: ReadPosition | null,
|
|
2259
2276
|
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
|
|
2260
2277
|
): void;
|
|
2278
|
+
/**
|
|
2279
|
+
* Similar to the above `fs.read` function, this version takes an optional `options` object.
|
|
2280
|
+
* If not otherwise specified in an `options` object,
|
|
2281
|
+
* `buffer` defaults to `Buffer.alloc(16384)`,
|
|
2282
|
+
* `offset` defaults to `0`,
|
|
2283
|
+
* `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
|
|
2284
|
+
* `position` defaults to `null`
|
|
2285
|
+
* @since v12.17.0, 13.11.0
|
|
2286
|
+
*/
|
|
2287
|
+
export function read<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2288
|
+
fd: number,
|
|
2289
|
+
options: ReadAsyncOptions<TBuffer>,
|
|
2290
|
+
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
|
|
2291
|
+
): void;
|
|
2292
|
+
export function read(
|
|
2293
|
+
fd: number,
|
|
2294
|
+
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void
|
|
2295
|
+
): void;
|
|
2261
2296
|
export namespace read {
|
|
2262
2297
|
/**
|
|
2263
2298
|
* @param fd A file descriptor.
|
|
@@ -2276,20 +2311,19 @@ declare module 'fs' {
|
|
|
2276
2311
|
bytesRead: number;
|
|
2277
2312
|
buffer: TBuffer;
|
|
2278
2313
|
}>;
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
position?: ReadPosition | null | undefined;
|
|
2314
|
+
function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
|
|
2315
|
+
fd: number,
|
|
2316
|
+
options: ReadAsyncOptions<TBuffer>
|
|
2317
|
+
): Promise<{
|
|
2318
|
+
bytesRead: number;
|
|
2319
|
+
buffer: TBuffer;
|
|
2320
|
+
}>;
|
|
2321
|
+
function __promisify__(
|
|
2322
|
+
fd: number
|
|
2323
|
+
): Promise<{
|
|
2324
|
+
bytesRead: number;
|
|
2325
|
+
buffer: NodeJS.ArrayBufferView;
|
|
2326
|
+
}>;
|
|
2293
2327
|
}
|
|
2294
2328
|
/**
|
|
2295
2329
|
* Returns the number of `bytesRead`.
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.23",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -215,6 +215,6 @@
|
|
|
215
215
|
},
|
|
216
216
|
"scripts": {},
|
|
217
217
|
"dependencies": {},
|
|
218
|
-
"typesPublisherContentHash": "
|
|
219
|
-
"typeScriptVersion": "3.
|
|
218
|
+
"typesPublisherContentHash": "31d9626c2d3ccc7c4b4e0d91e1ed56f52997cd7409e001330de7b00feb84ad8b",
|
|
219
|
+
"typeScriptVersion": "3.9"
|
|
220
220
|
}
|
node/process.d.ts
CHANGED
|
@@ -1405,7 +1405,7 @@ declare module 'process' {
|
|
|
1405
1405
|
emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean;
|
|
1406
1406
|
emit(event: 'warning', warning: Error): boolean;
|
|
1407
1407
|
emit(event: 'message', message: unknown, sendHandle: unknown): this;
|
|
1408
|
-
emit(event: Signals, signal
|
|
1408
|
+
emit(event: Signals, signal?: Signals): boolean;
|
|
1409
1409
|
emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
|
|
1410
1410
|
emit(event: 'worker', listener: WorkerListener): this;
|
|
1411
1411
|
on(event: 'beforeExit', listener: BeforeExitListener): this;
|
node/tls.d.ts
CHANGED
|
@@ -723,7 +723,7 @@ declare module 'tls' {
|
|
|
723
723
|
* object.passphrase is optional. Encrypted keys will be decrypted with
|
|
724
724
|
* object.passphrase if provided, or options.passphrase if it is not.
|
|
725
725
|
*/
|
|
726
|
-
key?: string | Buffer | Array<Buffer | KeyObject> | undefined;
|
|
726
|
+
key?: string | Buffer | Array<string | Buffer | KeyObject> | undefined;
|
|
727
727
|
/**
|
|
728
728
|
* Name of an OpenSSL engine to get private key from. Should be used
|
|
729
729
|
* together with privateKeyIdentifier.
|