asyncTaskManager.d.ts 412 B

1234567891011
  1. import { CancellationToken } from "builder-util-runtime";
  2. export declare class AsyncTaskManager {
  3. private readonly cancellationToken;
  4. readonly tasks: Array<Promise<any>>;
  5. private readonly errors;
  6. constructor(cancellationToken: CancellationToken);
  7. add(task: () => Promise<any>): void;
  8. addTask(promise: Promise<any>): void;
  9. cancelTasks(): void;
  10. awaitTasks(): Promise<Array<any>>;
  11. }