earljs
Version:
Ergonomic, modern and type-safe assertion library
12 lines (11 loc) • 425 B
TypeScript
import { Newable } from '../types';
import { Matcher } from './Base';
export declare class ErrorMatcher extends Matcher {
private readonly errorClass;
private readonly message?;
constructor(errorClass?: Newable<Error>, message?: string | undefined);
check(v: unknown): boolean;
toString(): string;
format(): string;
static make(classOrMessage: string | Newable<Error>, message?: string): Error;
}