@types/listr
- Version 0.14.10
- Published
- 6.07 kB
- 2 dependencies
- MIT license
Install
npm i @types/listryarn add @types/listrpnpm add @types/listrOverview
TypeScript definitions for listr
Index
Classes
Interfaces
Type Aliases
Classes
class Listr
class Listr<Ctx = Listr.ListrContext> {}constructor
constructor( tasks?: readonly Listr.ListrTask<Ctx>[], options?: Listr.ListrOptions<Ctx>);constructor
constructor(options?: Listr.ListrOptions<Ctx>);property tasks
tasks: readonly Listr.ListrTaskWrapper<Ctx>[];method add
add: (tasks: Listr.ListrTask<Ctx> | ReadonlyArray<Listr.ListrTask<Ctx>>) => void;method render
render: () => void;method run
run: (ctx?: Ctx) => Promise<Ctx>;method setRenderer
setRenderer: (value: Listr.ListrRendererValue<Ctx>) => void;Interfaces
interface ListrError
interface ListrError<Ctx> extends Error {}property context
context: Ctx;interface ListrEvent
interface ListrEvent {}interface ListrOptions
interface ListrOptions<Ctx = ListrContext> {}property concurrent
concurrent?: boolean | number | undefined;property exitOnError
exitOnError?: boolean | undefined;property nonTTYRenderer
nonTTYRenderer?: ListrRendererValue<Ctx> | undefined;property renderer
renderer?: ListrRendererValue<Ctx> | undefined;interface ListrRenderer
interface ListrRenderer {}interface ListrRendererClass
interface ListrRendererClass<Ctx> {}property nonTTY
nonTTY: boolean;construct signature
new ( tasks: ReadonlyArray<ListrTaskObject<Ctx>>, options: ListrOptions<Ctx>): ListrRenderer;interface ListrTask
interface ListrTask<Ctx = ListrContext> {}property enabled
enabled?: | ((ctx: Ctx) => boolean | Promise<boolean> | Observable<boolean>) | undefined;property skip
skip?: | (( ctx: Ctx ) => void | boolean | string | Promise<undefined | boolean | string>) | undefined;property task
task: (ctx: Ctx, task: ListrTaskWrapper<Ctx>) => void | ListrTaskResult<Ctx>;property title
title: string;interface ListrTaskObject
interface ListrTaskObject<Ctx> extends Observable<ListrEvent> {}property check
check: (ctx: Ctx) => void;property output
output?: string | undefined;property run
run: (ctx: Ctx, wrapper: ListrTaskWrapper<Ctx>) => Promise<void>;property skip
skip: ( ctx: Ctx) => void | boolean | string | Promise<undefined | boolean | string>;property state
state: string;property subtasks
subtasks: ReadonlyArray<ListrTaskWrapper<Ctx>>;property task
task: (ctx: Ctx, task: ListrTaskWrapper<Ctx>) => void | ListrTaskResult<Ctx>;property title
title: string;method hasFailed
hasFailed: () => boolean;method hasSubtasks
hasSubtasks: () => boolean;method isCompleted
isCompleted: () => boolean;method isEnabled
isEnabled: () => boolean;method isPending
isPending: () => boolean;method isSkipped
isSkipped: () => boolean;Type Aliases
type ListrContext
type ListrContext = any;type ListrRendererValue
type ListrRendererValue<Ctx> = | 'silent' | 'default' | 'verbose' | ListrRendererClass<Ctx>;type ListrTaskResult
type ListrTaskResult<Ctx> = | string | Promise<any> | Listr<Ctx> | stream.Readable | Observable<any>;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/listr.
- Markdown[](https://www.jsdocs.io/package/@types/listr)
- HTML<a href="https://www.jsdocs.io/package/@types/listr"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4020 ms. - Missing or incorrect documentation? Open an issue for this package.
