promise.d.ts 482 B

1234567
  1. export declare function printErrorAndExit(error: Error): void;
  2. export declare function executeFinally<T>(promise: Promise<T>, task: (isErrorOccurred: boolean) => Promise<any>): Promise<T>;
  3. export declare class NestedError extends Error {
  4. constructor(errors: Array<Error>, message?: string);
  5. }
  6. export declare function orNullIfFileNotExist<T>(promise: Promise<T>): Promise<T | null>;
  7. export declare function orIfFileNotExist<T>(promise: Promise<T>, fallbackValue: T): Promise<T>;