Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
1959
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/node - npm Package Compare versions

Comparing version 20.17.5 to 20.17.6

4

node v20.17/package.json
{
"name": "@types/node",
"version": "20.17.5",
"version": "20.17.6",
"description": "TypeScript definitions for node",

@@ -223,4 +223,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

"peerDependencies": {},
"typesPublisherContentHash": "e138c8aac91c9e2a9ee62ceedbbaedf2bfd67e9d9745cbdc3ac2bc7d52a41261",
"typesPublisherContentHash": "e945f5f992cda0b183de7a341748f9671f16e3ff888f00547c222f8ff2fcba76",
"typeScriptVersion": "4.8"
}
/**
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream
* (such as [`process.stdin`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdin)) one line at a time.
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream
* (such as [`process.stdin`](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/process.html#processstdin)) one line at a time.
*

@@ -49,3 +49,3 @@ * To use the promise-based APIs:

* Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
* single `input` [Readable](https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream.
* single `input` [Readable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream.
* The `output` stream is used to print prompts for user input that arrives on,

@@ -104,3 +104,3 @@ * and is read from, the `input` stream.

*
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
* @see https://nodejs.org/docs/latest-v20.x/api/readline.html#class-interfaceconstructor
*/

@@ -119,3 +119,3 @@ protected constructor(

*
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#class-interfaceconstructor
* @see https://nodejs.org/docs/latest-v20.x/api/readline.html#class-interfaceconstructor
*/

@@ -320,25 +320,74 @@ protected constructor(options: ReadLineOptions);

export interface ReadLineOptions {
/**
* The [`Readable`](https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream to listen to
*/
input: NodeJS.ReadableStream;
/**
* The [`Writable`](https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream to write readline data to.
*/
output?: NodeJS.WritableStream | undefined;
/**
* An optional function used for Tab autocompletion.
*/
completer?: Completer | AsyncCompleter | undefined;
/**
* `true` if the `input` and `output` streams should be treated like a TTY,
* and have ANSI/VT100 escape codes written to it.
* Default: checking `isTTY` on the `output` stream upon instantiation.
*/
terminal?: boolean | undefined;
/**
* Initial list of history lines. This option makes sense
* only if `terminal` is set to `true` by the user or by an internal `output`
* check, otherwise the history caching mechanism is not initialized at all.
* Initial list of history lines.
* This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
* otherwise the history caching mechanism is not initialized at all.
* @default []
*/
history?: string[] | undefined;
/**
* Maximum number of history lines retained.
* To disable the history set this value to `0`.
* This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
* otherwise the history caching mechanism is not initialized at all.
* @default 30
*/
historySize?: number | undefined;
/**
* If `true`, when a new input line added to the history list duplicates an older one,
* this removes the older line from the list.
* @default false
*/
removeHistoryDuplicates?: boolean | undefined;
/**
* The prompt string to use.
* @default "> "
*/
prompt?: string | undefined;
/**
* If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds,
* both `\r` and `\n` will be treated as separate end-of-line input.
* `crlfDelay` will be coerced to a number no less than `100`.
* It can be set to `Infinity`, in which case
* `\r` followed by `\n` will always be considered a single newline
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v20.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
* @default 100
*/
crlfDelay?: number | undefined;
/**
* If `true`, when a new input line added
* to the history list duplicates an older one, this removes the older line
* from the list.
* @default false
* The duration `readline` will wait for a character
* (when reading an ambiguous key sequence in milliseconds
* one that can both form a complete key sequence using the input read so far
* and can take additional input to complete a longer key sequence).
* @default 500
*/
removeHistoryDuplicates?: boolean | undefined;
escapeCodeTimeout?: number | undefined;
/**
* The number of spaces a tab is equal to (minimum 1).
* @default 8
*/
tabSize?: number | undefined;
/**
* Allows closing the interface using an AbortSignal.
* Aborting the signal will internally call `close` on the interface.
*/
signal?: AbortSignal | undefined;
}

@@ -510,3 +559,3 @@ /**

/**
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) stream
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) stream
* in a specified direction identified by `dir`.

@@ -519,3 +568,3 @@ * @since v0.7.7

/**
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) stream from
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) stream from
* the current position of the cursor down.

@@ -529,3 +578,3 @@ * @since v0.7.7

* The `readline.cursorTo()` method moves cursor to the specified position in a
* given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`.
* given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`.
* @since v0.7.7

@@ -538,3 +587,3 @@ * @param callback Invoked once the operation completes.

* The `readline.moveCursor()` method moves the cursor _relative_ to its current
* position in a given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`.
* position in a given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`.
* @since v0.7.7

@@ -541,0 +590,0 @@ * @param callback Invoked once the operation completes.

@@ -6,4 +6,9 @@ /**

declare module "readline/promises" {
import { AsyncCompleter, Completer, Direction, Interface as _Interface, ReadLineOptions } from "node:readline";
import { Abortable } from "node:events";
import {
CompleterResult,
Direction,
Interface as _Interface,
ReadLineOptions as _ReadLineOptions,
} from "node:readline";
/**

@@ -115,2 +120,9 @@ * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a

}
type Completer = (line: string) => CompleterResult | Promise<CompleterResult>;
interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> {
/**
* An optional function used for Tab autocompletion.
*/
completer?: Completer | undefined;
}
/**

@@ -145,3 +157,3 @@ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.

output?: NodeJS.WritableStream,
completer?: Completer | AsyncCompleter,
completer?: Completer,
terminal?: boolean,

@@ -148,0 +160,0 @@ ): Interface;

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 31 Oct 2024 18:02:52 GMT
* Last updated: Sun, 03 Nov 2024 04:02:17 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

@@ -14,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc