listr.d.ts 1.5 KB

123456789101112131415161718
  1. import { ListrBaseClassOptions, ListrClass, ListrContext, ListrDefaultRendererValue, ListrError, ListrFallbackRendererValue, ListrGetRendererClassFromValue, ListrGetRendererOptions, ListrRendererFactory, ListrRendererValue, ListrTask, ListrTaskObject } from './interfaces/listr.interface';
  2. import { Task } from './lib/task';
  3. export declare class Listr<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue, FallbackRenderer extends ListrRendererValue = ListrFallbackRendererValue> implements ListrClass<Ctx, Renderer, FallbackRenderer> {
  4. task: ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>> | ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>>[];
  5. options?: ListrBaseClassOptions<Ctx, Renderer, FallbackRenderer>;
  6. tasks: Task<Ctx, ListrGetRendererClassFromValue<Renderer>>[];
  7. err: ListrError[];
  8. rendererClass: ListrRendererFactory;
  9. rendererClassOptions: ListrGetRendererOptions<ListrRendererFactory>;
  10. renderHook$: ListrTaskObject<any, any>['renderHook$'];
  11. private concurrency;
  12. private renderer;
  13. constructor(task: ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>> | ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>>[], options?: ListrBaseClassOptions<Ctx, Renderer, FallbackRenderer>);
  14. add(task: ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>> | ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>>[]): void;
  15. run(context?: Ctx): Promise<Ctx>;
  16. private checkAll;
  17. private runTask;
  18. }