@types/prompts
- Version 2.4.9
- Published
- 7.96 kB
- 2 dependencies
- MIT license
Install
npm i @types/promptsyarn add @types/promptspnpm add @types/promptsOverview
TypeScript definitions for prompts
Index
Variables
Functions
Interfaces
Type Aliases
Namespaces
Variables
variable prompt
const prompt: any;Functions
Interfaces
interface Choice
interface Choice {}property description
description?: string | undefined;property disabled
disabled?: boolean | undefined;property selected
selected?: boolean | undefined;property title
title: string;property value
value?: any;interface Options
interface Options {}interface PromptObject
interface PromptObject<T extends string = string> {}property active
active?: string | PrevCaller<T, string | Falsy> | undefined;property choices
choices?: Choice[] | PrevCaller<T, Choice[] | Falsy> | undefined;property float
float?: boolean | PrevCaller<T, boolean | Falsy> | undefined;property format
format?: PrevCaller<T, void> | undefined;property hint
hint?: string | PrevCaller<T, string | Falsy> | undefined;property inactive
inactive?: string | PrevCaller<T, string | Falsy> | undefined;property increment
increment?: number | PrevCaller<T, number | Falsy> | undefined;property initial
initial?: | InitialReturnValue | PrevCaller<T, InitialReturnValue | Promise<InitialReturnValue>> | undefined;property instructions
instructions?: string | boolean | undefined;property limit
limit?: number | PrevCaller<T, number | Falsy> | undefined;property mask
mask?: string | PrevCaller<T, string | Falsy> | undefined;property max
max?: number | PrevCaller<T, number | Falsy> | undefined;property message
message?: ValueOrFunc<string> | undefined;property min
min?: number | PrevCaller<T, number | Falsy> | undefined;property name
name: ValueOrFunc<T>;property onRender
onRender?: ((kleur: Kleur) => void) | undefined;property onState
onState?: PrevCaller<T, void> | undefined;property round
round?: number | PrevCaller<T, number | Falsy> | undefined;property separator
separator?: string | PrevCaller<T, string | Falsy> | undefined;property stdin
stdin?: Readable | undefined;property stdout
stdout?: Writable | undefined;property style
style?: string | PrevCaller<T, string | Falsy> | undefined;property suggest
suggest?: ((input: any, choices: Choice[]) => Promise<any>) | undefined;property type
type: PromptType | Falsy | PrevCaller<T, PromptType | Falsy>;property validate
validate?: | PrevCaller<T, boolean | string | Promise<boolean | string>> | undefined;property warn
warn?: string | PrevCaller<T, string | Falsy> | undefined;Type Aliases
type Answers
type Answers<T extends string> = { [id in T]: any };type Falsy
type Falsy = false | null | undefined;type InitialReturnValue
type InitialReturnValue = string | number | boolean | Date;type PrevCaller
type PrevCaller<T extends string, R = T> = ( prev: any, values: Answers<T>, prompt: PromptObject) => R;type PromptType
type PromptType = | 'text' | 'password' | 'invisible' | 'number' | 'confirm' | 'list' | 'toggle' | 'select' | 'multiselect' | 'autocomplete' | 'date' | 'autocompleteMultiselect';type ValueOrFunc
type ValueOrFunc<T extends string> = T | PrevCaller<T>;Namespaces
namespace prompts
namespace prompts {}function autocomplete
autocomplete: (args: PromptObject) => any;function confirm
confirm: (args: PromptObject) => void;function date
date: (args: PromptObject) => any;function invisible
invisible: (args: PromptObject) => any;function list
list: (args: PromptObject) => any;function multiselect
multiselect: (args: PromptObject) => any;function number
number: (args: PromptObject) => void;function password
password: (args: PromptObject) => any;function select
select: (args: PromptObject) => void;function text
text: (args: PromptObject) => void;function toggle
toggle: (args: PromptObject) => void;Package Files (1)
Dependencies (2)
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/prompts.
- Markdown[](https://www.jsdocs.io/package/@types/prompts)
- HTML<a href="https://www.jsdocs.io/package/@types/prompts"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2756 ms. - Missing or incorrect documentation? Open an issue for this package.
