@types/readline-sync
- Version 1.4.8
- Published
- 6.11 kB
- No dependencies
- MIT license
Install
npm i @types/readline-sync
yarn add @types/readline-sync
pnpm add @types/readline-sync
Overview
TypeScript definitions for readline-sync
Index
Functions
Interfaces
Type Aliases
Functions
function getRawInput
getRawInput: () => string;
function keyIn
keyIn: (query?: any, options?: BasicOptions) => string;
function keyInPause
keyInPause: (query?: any, options?: BasicOptions) => void;
function keyInSelect
keyInSelect: (items: string[], query?: any, options?: BasicOptions) => number;
function keyInYN
keyInYN: (query?: any, options?: BasicOptions) => boolean | string;
function keyInYNStrict
keyInYNStrict: (query?: any, options?: BasicOptions) => boolean;
function prompt
prompt: (options?: BasicOptions) => string;
function promptCL
promptCL: ( commandHandler?: | { [id: string]: (...args: string[]) => void } | ((command: string, ...args: string[]) => void), options?: BasicOptions) => string[];
function promptCLLoop
promptCLLoop: ( commandHandler?: | { [id: string]: (...args: string[]) => boolean | void } | ((command: string, ...args: string[]) => boolean | void), options?: BasicOptions) => void;
function promptLoop
promptLoop: ( inputHandler: (value: string) => boolean, options?: BasicOptions) => void;
function promptSimShell
promptSimShell: (options?: BasicOptions) => string;
function question
question: (query?: any, options?: BasicOptions) => string;
function questionEMail
questionEMail: (query?: any, options?: BasicOptions) => string;
function questionFloat
questionFloat: (query?: any, options?: BasicOptions) => number;
function questionInt
questionInt: (query?: any, options?: BasicOptions) => number;
function questionNewPassword
questionNewPassword: (query?: any, options?: BasicOptions) => string;
function questionPath
questionPath: (query?: any, options?: BasicOptions) => string;
function setBufferSize
setBufferSize: (value: number) => void;
Deprecated
Use the bufferSize option instead: readlineSync.setDefaultOptions({bufferSize: value});
function setDefaultOptions
setDefaultOptions: (options?: BasicOptions) => BasicOptions;
function setEncoding
setEncoding: (value: string) => void;
Deprecated
Use the encoding option instead: readlineSync.setDefaultOptions({encoding: value});
function setMask
setMask: (value: string) => void;
Deprecated
Use the mask option instead: readlineSync.setDefaultOptions({mask: value});
function setPrint
setPrint: (value: (display: string, encoding: string) => void) => void;
Deprecated
Use the print option instead: readlineSync.setDefaultOptions({print: value});
function setPrompt
setPrompt: (value: any) => void;
Deprecated
Use the prompt option instead: readlineSync.setDefaultOptions({prompt: value});
Interfaces
interface BasicOptions
interface BasicOptions {}
property bufferSize
bufferSize?: number | undefined;
property cancel
cancel?: any;
property caseSensitive
caseSensitive?: boolean | undefined;
property cd
cd?: boolean | undefined;
property charlist
charlist?: string | undefined;
property confirmMessage
confirmMessage?: any;
property create
create?: boolean | undefined;
property defaultInput
defaultInput?: string | undefined;
property encoding
encoding?: string | undefined;
property exists
exists?: any;
property falseValue
falseValue?: OptionType | OptionType[] | undefined;
property guide
guide?: boolean | undefined;
property hideEchoBack
hideEchoBack?: boolean | undefined;
property history
history?: boolean | undefined;
property isDirectory
isDirectory?: boolean | undefined;
property isFile
isFile?: boolean | undefined;
property keepWhitespace
keepWhitespace?: boolean | undefined;
property limit
limit?: OptionType | OptionType[] | undefined;
property limitMessage
limitMessage?: string | undefined;
property mask
mask?: string | undefined;
property max
max?: any;
property min
min?: any;
property prompt
prompt?: any;
property trueValue
trueValue?: OptionType | OptionType[] | undefined;
property unmatchMessage
unmatchMessage?: any;
method print
print: (display: string, encoding: string) => void;
method validate
validate: (path: string) => boolean | string;
Type Aliases
type OptionType
type OptionType = string | number | RegExp | ((input: string) => boolean);
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/readline-sync
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/readline-sync)
- HTML<a href="https://www.jsdocs.io/package/@types/readline-sync"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4169 ms. - Missing or incorrect documentation? Open an issue for this package.