@types/prompt
- Version 1.1.9
- Published
- 5.4 kB
- 2 dependencies
- MIT license
Install
npm i @types/prompt
yarn add @types/prompt
pnpm add @types/prompt
Overview
TypeScript definitions for prompt
Index
Classes
Interfaces
Type Aliases
Classes
class prompt
class prompt extends EventEmitter {}
property colors
static colors: boolean;
property delimiter
static delimiter: string;
property message
static message: string;
property override
static override?: any;
property version
static version: string;
method addProperties
static addProperties: { (obj: any, values: Array<string | prompt.RevalidatorSchema>): Promise<void>; ( obj: any, values: any[], callback: prompt.GetCallback<prompt.Properties> ): void;};
method get
static get: { <T extends prompt.Properties>( values: | Array<keyof T | prompt.Schema | prompt.RevalidatorSchema> | prompt.Schema | prompt.RevalidatorSchema ): Promise<T>; <T extends prompt.Properties>( values: any, callback: prompt.GetCallback<T> ): void;};
method history
static history: (name?: string | number) => prompt.History | null;
method on
on: { ( event: 'invalid', listener: (prop: prompt.RevalidatorSchema | string, line: number) => void ): this; (event: 'prompt', listener: (prop: any) => void): this; ( event: 'pause' | 'resume' | 'SIGINT' | 'start' | 'stop', listener: () => void ): this;};
method start
static start: (options?: prompt.StartOptions) => void;
method stop
static stop: () => void;
Interfaces
interface History
interface History {}
interface Properties
interface Properties {}
index signature
[name: string]: RevalidatorSchema | string;
interface Schema
interface Schema {}
property properties
properties: Properties;
interface StartOptions
interface StartOptions {}
property allowEmpty
allowEmpty?: boolean | undefined;
property colors
colors?: boolean | undefined;
property delimiter
delimiter?: string | undefined;
property memory
memory?: number | undefined;
property message
message?: string | undefined;
property noHandleSIGINT
noHandleSIGINT?: boolean | undefined;
property stdin
stdin?: ReadStream | undefined;
property stdout
stdout?: WriteStream | undefined;
Type Aliases
type AddCallback
type AddCallback = (err: Error | null) => void;
type AskFunction
type AskFunction = () => boolean;
type BeforeFunction
type BeforeFunction = (line: string) => string;
type GetCallback
type GetCallback<T> = (err: Error | null, result: T) => void;
type RevalidatorSchema
type RevalidatorSchema = Partial<Revalidator.ISchema<any>> & { ask?: AskFunction | undefined; before?: BeforeFunction | undefined; name?: string | undefined; raw?: [string, string] | undefined; hidden?: boolean; replace?: string;};
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/prompt
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/prompt)
- HTML<a href="https://www.jsdocs.io/package/@types/prompt"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3494 ms. - Missing or incorrect documentation? Open an issue for this package.