BREAKING CHANGE(docs): Update documentation and examples to unify async and sync assertions, add custom matcher guides, and update package configuration
This commit is contained in:
13
ts/types.ts
Normal file
13
ts/types.ts
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Common types for smartexpect
|
||||
*/
|
||||
/** Execution mode: sync or async */
|
||||
export type TExecutionType = 'sync' | 'async';
|
||||
/**
|
||||
* Definition of a custom matcher function.
|
||||
* Should return an object with `pass` and optional `message`.
|
||||
*/
|
||||
export type TMatcher = (
|
||||
received: any,
|
||||
...args: any[]
|
||||
) => { pass: boolean; message?: string | (() => string) };
|
Reference in New Issue
Block a user