dotfiles/interfaces/Listr.ts
Florian Bouillon d0f8f945f3
Initial commit
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2020-01-08 22:47:50 +01:00

20 lines
507 B
TypeScript

export default interface ListI {
new (list: ListrInterface[], options?: ListrOptions): ListI
run: () => Promise<void>
}
export interface ListrOptions {
concurrent?: boolean
}
export interface ListrInterface {
title: string,
enabled?: (ctx: any) => boolean,
skip?: (ctx?: any) => string|undefined|boolean|Promise<string|undefined|boolean>,
task: (ctx?: any, task?: Task) => (void|string|ListI|Promise<void|string|ListI>)
}
export interface Task {
skip: (str: string) => boolean|string|undefined
}