@push.rocks/smartexpect
Version:
A testing library to manage expectations in code, offering both synchronous and asynchronous assertion methods.
15 lines (14 loc) • 761 B
TypeScript
import { Assertion } from '../smartexpect.classes.assertion.js';
import type { TExecutionType } from '../types.js';
/**
* Namespace for type-based matchers
*/
export declare class TypeMatchers<M extends TExecutionType> {
private assertion;
constructor(assertion: Assertion<any, M>);
toBeTypeofString(): M extends "async" ? Promise<Assertion<any, M>> : Assertion<any, M>;
toBeTypeofNumber(): M extends "async" ? Promise<Assertion<any, M>> : Assertion<any, M>;
toBeTypeofBoolean(): M extends "async" ? Promise<Assertion<any, M>> : Assertion<any, M>;
toBeTypeOf(typeName: string): M extends "async" ? Promise<Assertion<any, M>> : Assertion<any, M>;
toBeDefined(): M extends "async" ? Promise<Assertion<any, M>> : Assertion<any, M>;
}