import { Constructor, ErrorPredicate } from '../utils/process-error'; interface Rejects { /** * check if promise rejects * @param promise * @example rejects(Promise.reject()); */ (promise: Promise, message?: string): Promise; /** * check if promise rejects with an instance of constructor * @param promise * @param constructor - expected error constructor * @example rejects(Promise.reject(new Error()), Error); */ (promise: Promise, constructor: Constructor, message?: string): Promise; /** * check if promise rejects with a specific error message * @param promise * @param regex - expected error message regex * @example rejects(Promise.reject(new Error('This is worrying)), /worrying/); */ (promise: Promise, constructor: RegExp, message?: string): Promise; /** * check if promise rejects with and matches the predicate function * @param promise * @param predicate - predicate function that receives the error and returns boolean * @example rejects(Promise.reject(new Error('This is worrying')), (error) => error.message === 'This is worrying');)); */ (promise: Promise, constructor: ErrorPredicate, message?: string): Promise; } export declare const rejects: Rejects, notRejects: Rejects; export {}; //# sourceMappingURL=rejects.d.ts.map