index.d.ts 611 B

1234567891011121314151617181920
  1. import { CancelablePromise, Prompt } from '@inquirer/type';
  2. import { ListrPromptAdapter } from 'listr2';
  3. declare class ListrInquirerPromptAdapter extends ListrPromptAdapter {
  4. private prompt;
  5. /**
  6. * Get the current running instance of `inquirer`.
  7. */
  8. get instance(): CancelablePromise<any>;
  9. /**
  10. * Create a new prompt with `inquirer`.
  11. */
  12. run<T extends Prompt<any, any> = Prompt<any, any>>(prompt: T, ...[config, context]: Parameters<T>): Promise<ReturnType<T>>;
  13. /**
  14. * Cancel the ongoing prompt.
  15. */
  16. cancel(): void;
  17. }
  18. export { ListrInquirerPromptAdapter };