deno.land / std@0.167.0 / node / _readline_shared_types.d.ts

_readline_shared_types.d.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
// Part of https://github.com/DefinitelyTyped/DefinitelyTyped/blob/cd61f5b4d3d143108569ec3f88adc0eb34b961c4/types/node/readline.d.ts
// This .d.ts file is provided to avoid circular dependencies.
import type { ReadableStream, WritableStream } from "./_global.d.ts";
export type Completer = (line: string) => CompleterResult;export type AsyncCompleter = ( line: string, callback: (err?: null | Error, result?: CompleterResult) => void,) => void;export type CompleterResult = [string[], string];export interface ReadLineOptions { input: ReadableStream; output?: WritableStream | undefined; completer?: Completer | AsyncCompleter | undefined; 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. * @default [] */ history?: string[] | undefined; historySize?: number | undefined; prompt?: string | undefined; 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 */ removeHistoryDuplicates?: boolean | undefined; escapeCodeTimeout?: number | undefined; tabSize?: number | undefined;}
std

Version Info

Tagged at
a year ago