feat(generics): Improve assertion and matcher type definitions by adding execution mode generics for better async/sync support

This commit is contained in:
2025-04-29 12:08:57 +00:00
parent 81bd8bfb13
commit 8cb70b6afe
12 changed files with 85 additions and 60 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## 2025-04-29 - 2.2.0 - feat(generics)
Improve assertion and matcher type definitions by adding execution mode generics for better async/sync support
- Updated ts/index.ts to import and use TExecutionType in the expect function
- Modified Assertion class to use a generic execution mode (M) for improved type inference
- Revised all matcher namespaces (array, boolean, date, function, number, object, string, type) to accept the new generic parameter
- Enhanced async/sync distinction for assertion methods like resolves and rejects
## 2025-04-29 - 2.1.2 - fix(ts/index.ts)
Remove deprecated expectAsync function and advise using .resolves/.rejects on expect for async assertions