feat(generics): Improve assertion and matcher type definitions by adding execution mode generics for better async/sync support
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
import { Assertion } from '../smartexpect.classes.assertion.js';
|
||||
import type { TExecutionType } from '../types.js';
|
||||
|
||||
/**
|
||||
* Namespace for type-based matchers
|
||||
*/
|
||||
export class TypeMatchers {
|
||||
constructor(private assertion: Assertion<any>) {}
|
||||
export class TypeMatchers<M extends TExecutionType> {
|
||||
constructor(private assertion: Assertion<any, M>) {}
|
||||
|
||||
toBeTypeofString() {
|
||||
return this.assertion.customAssertion(
|
||||
|
Reference in New Issue
Block a user