UNPKG

@plugjs/plug

Version:
17 lines (16 loc) 877 B
/** A {@link BuildFailure} represents an error _already logged_ in our build. */ export declare class BuildFailure extends Error { readonly errors?: readonly any[] | undefined; /** Construct a {@link BuildFailure} */ constructor(message?: string | undefined, errors?: any[]); static fail(): BuildFailure; static withMessage(message: string): BuildFailure; static withErrors(errors: any[]): BuildFailure; static [Symbol.hasInstance](instance: any): boolean; } /** Await and assert that all specified promises were fulfilled */ export declare function assertPromises<T>(promises: (T | Promise<T>)[]): Promise<T[]>; /** Asserts something as _truthy_ and fail the build if not */ export declare function assert(assertion: any, message: string): asserts assertion; /** Fail a build with a message */ export declare function fail(message: string): never;