@types/node 18.19.63 → 18.19.65
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 v18.19/README.md +1 -1
- node v18.19/module.d.ts +1 -1
- node v18.19/package.json +3 -3
- node v18.19/readline/promises.d.ts +14 -3
- node v18.19/readline.d.ts +59 -10
node v18.19/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v18.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sat, 23 Nov 2024 04:36:04 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node v18.19/module.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare module "module" {
|
|
|
46
46
|
* should be fetched.
|
|
47
47
|
* @since v13.7.0, v12.17.0
|
|
48
48
|
*/
|
|
49
|
-
function findSourceMap(path: string, error?: Error): SourceMap;
|
|
49
|
+
function findSourceMap(path: string, error?: Error): SourceMap | undefined;
|
|
50
50
|
interface SourceMapPayload {
|
|
51
51
|
file: string;
|
|
52
52
|
version: number;
|
node v18.19/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.19.
|
|
3
|
+
"version": "18.19.65",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -225,6 +225,6 @@
|
|
|
225
225
|
"undici-types": "~5.26.4"
|
|
226
226
|
},
|
|
227
227
|
"peerDependencies": {},
|
|
228
|
-
"typesPublisherContentHash": "
|
|
229
|
-
"typeScriptVersion": "4.
|
|
228
|
+
"typesPublisherContentHash": "4ebed7550a6d507f40de92927dc1c3ba42a47e375b5d7448a1f5f00f51b31bad",
|
|
229
|
+
"typeScriptVersion": "4.9"
|
|
230
230
|
}
|
|
@@ -5,8 +5,13 @@
|
|
|
5
5
|
* @since v17.0.0
|
|
6
6
|
*/
|
|
7
7
|
declare module "readline/promises" {
|
|
8
|
-
import { AsyncCompleter, Completer, Direction, Interface as _Interface, ReadLineOptions } from "node:readline";
|
|
9
8
|
import { Abortable } from "node:events";
|
|
9
|
+
import {
|
|
10
|
+
CompleterResult,
|
|
11
|
+
Direction,
|
|
12
|
+
Interface as _Interface,
|
|
13
|
+
ReadLineOptions as _ReadLineOptions,
|
|
14
|
+
} from "node:readline";
|
|
10
15
|
|
|
11
16
|
class Interface extends _Interface {
|
|
12
17
|
/**
|
|
@@ -80,7 +85,13 @@ declare module "readline/promises" {
|
|
|
80
85
|
*/
|
|
81
86
|
rollback(): this;
|
|
82
87
|
}
|
|
83
|
-
|
|
88
|
+
type Completer = (line: string) => CompleterResult | Promise<CompleterResult>;
|
|
89
|
+
interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> {
|
|
90
|
+
/**
|
|
91
|
+
* An optional function used for Tab autocompletion.
|
|
92
|
+
*/
|
|
93
|
+
completer?: Completer | undefined;
|
|
94
|
+
}
|
|
84
95
|
/**
|
|
85
96
|
* The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
|
|
86
97
|
*
|
|
@@ -133,7 +144,7 @@ declare module "readline/promises" {
|
|
|
133
144
|
function createInterface(
|
|
134
145
|
input: NodeJS.ReadableStream,
|
|
135
146
|
output?: NodeJS.WritableStream,
|
|
136
|
-
completer?: Completer
|
|
147
|
+
completer?: Completer,
|
|
137
148
|
terminal?: boolean,
|
|
138
149
|
): Interface;
|
|
139
150
|
function createInterface(options: ReadLineOptions): Interface;
|
node v18.19/readline.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ declare module "readline" {
|
|
|
100
100
|
* > Instances of the `readline.Interface` class are constructed using the
|
|
101
101
|
* > `readline.createInterface()` method.
|
|
102
102
|
*
|
|
103
|
-
* @see https://nodejs.org/
|
|
103
|
+
* @see https://nodejs.org/docs/latest-v18.x/api/readline.html#readline_class_interface
|
|
104
104
|
*/
|
|
105
105
|
protected constructor(
|
|
106
106
|
input: NodeJS.ReadableStream,
|
|
@@ -114,7 +114,7 @@ declare module "readline" {
|
|
|
114
114
|
* > Instances of the `readline.Interface` class are constructed using the
|
|
115
115
|
* > `readline.createInterface()` method.
|
|
116
116
|
*
|
|
117
|
-
* @see https://nodejs.org/
|
|
117
|
+
* @see https://nodejs.org/docs/latest-v18.x/api/readline.html#readline_class_interface
|
|
118
118
|
*/
|
|
119
119
|
protected constructor(options: ReadLineOptions);
|
|
120
120
|
/**
|
|
@@ -331,29 +331,78 @@ declare module "readline" {
|
|
|
331
331
|
) => void;
|
|
332
332
|
export type CompleterResult = [string[], string];
|
|
333
333
|
export interface ReadLineOptions {
|
|
334
|
+
/**
|
|
335
|
+
* The [`Readable`](https://nodejs.org/docs/latest-v18.x/api/stream.html#readable-streams) stream to listen to
|
|
336
|
+
*/
|
|
334
337
|
input: NodeJS.ReadableStream;
|
|
338
|
+
/**
|
|
339
|
+
* The [`Writable`](https://nodejs.org/docs/latest-v18.x/api/stream.html#writable-streams) stream to write readline data to.
|
|
340
|
+
*/
|
|
335
341
|
output?: NodeJS.WritableStream | undefined;
|
|
342
|
+
/**
|
|
343
|
+
* An optional function used for Tab autocompletion.
|
|
344
|
+
*/
|
|
336
345
|
completer?: Completer | AsyncCompleter | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* `true` if the `input` and `output` streams should be treated like a TTY,
|
|
348
|
+
* and have ANSI/VT100 escape codes written to it.
|
|
349
|
+
* Default: checking `isTTY` on the `output` stream upon instantiation.
|
|
350
|
+
*/
|
|
337
351
|
terminal?: boolean | undefined;
|
|
338
352
|
/**
|
|
339
|
-
*
|
|
340
|
-
* only if `terminal` is set to `true` by the user or by an internal `output`
|
|
341
|
-
*
|
|
353
|
+
* Initial list of history lines.
|
|
354
|
+
* This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
|
|
355
|
+
* otherwise the history caching mechanism is not initialized at all.
|
|
342
356
|
* @default []
|
|
343
357
|
*/
|
|
344
358
|
history?: string[] | undefined;
|
|
359
|
+
/**
|
|
360
|
+
* Maximum number of history lines retained.
|
|
361
|
+
* To disable the history set this value to `0`.
|
|
362
|
+
* This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
|
|
363
|
+
* otherwise the history caching mechanism is not initialized at all.
|
|
364
|
+
* @default 30
|
|
365
|
+
*/
|
|
345
366
|
historySize?: number | undefined;
|
|
346
|
-
prompt?: string | undefined;
|
|
347
|
-
crlfDelay?: number | undefined;
|
|
348
367
|
/**
|
|
349
|
-
* If `true`, when a new input line added
|
|
350
|
-
*
|
|
351
|
-
* from the list.
|
|
368
|
+
* If `true`, when a new input line added to the history list duplicates an older one,
|
|
369
|
+
* this removes the older line from the list.
|
|
352
370
|
* @default false
|
|
353
371
|
*/
|
|
354
372
|
removeHistoryDuplicates?: boolean | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* The prompt string to use.
|
|
375
|
+
* @default "> "
|
|
376
|
+
*/
|
|
377
|
+
prompt?: string | undefined;
|
|
378
|
+
/**
|
|
379
|
+
* If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds,
|
|
380
|
+
* both `\r` and `\n` will be treated as separate end-of-line input.
|
|
381
|
+
* `crlfDelay` will be coerced to a number no less than `100`.
|
|
382
|
+
* It can be set to `Infinity`, in which case
|
|
383
|
+
* `\r` followed by `\n` will always be considered a single newline
|
|
384
|
+
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v18.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
|
|
385
|
+
* @default 100
|
|
386
|
+
*/
|
|
387
|
+
crlfDelay?: number | undefined;
|
|
388
|
+
/**
|
|
389
|
+
* The duration `readline` will wait for a character
|
|
390
|
+
* (when reading an ambiguous key sequence in milliseconds
|
|
391
|
+
* one that can both form a complete key sequence using the input read so far
|
|
392
|
+
* and can take additional input to complete a longer key sequence).
|
|
393
|
+
* @default 500
|
|
394
|
+
*/
|
|
355
395
|
escapeCodeTimeout?: number | undefined;
|
|
396
|
+
/**
|
|
397
|
+
* The number of spaces a tab is equal to (minimum 1).
|
|
398
|
+
* @default 8
|
|
399
|
+
*/
|
|
356
400
|
tabSize?: number | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* Allows closing the interface using an AbortSignal.
|
|
403
|
+
* Aborting the signal will internally call `close` on the interface.
|
|
404
|
+
*/
|
|
405
|
+
signal?: AbortSignal | undefined;
|
|
357
406
|
}
|
|
358
407
|
/**
|
|
359
408
|
* The `readline.createInterface()` method creates a new `readline.Interface`instance.
|