v0.20.0
Breaking changes
This change updates how overloaded functions are treated. Now, .parameters
gives you a union of the parameter-tuples that a function can take. For example, given the following type:
type Factorize = {
(input: number): number[]
(input: bigint): bigint[]
}
Behvaiour before:
expectTypeOf<Factorize>().parameters.toEqualTypeOf<[bigint]>()
Behaviour now:
expectTypeOf<Factorize>().parameters.toEqualTypeOf<[number] | [bigint]>()
There were similar changes for .returns
, .parameter(...)
, and .toBeCallableWith
. Also, overloaded functions are now differentiated properly when using .branded.toEqualTypeOf
(this was a bug that it seems nobody found).
See #83 for more details or look at the updated docs (including a new section called "Overloaded functions", which has more info on how this behaviour differs for TypeScript versions before 5.3).
What's Changed
- Fix rendering issue in readme by @mrazauskas in #69
- Fix minor issues in docs by @aryaemami59 in #91
- create utils file by @mmkal in #93
- branding.ts and messages.ts by @mmkal in #95
- improve overloads support, attempt 2 by @mmkal in #83
- Extends: explain myself 1e37116
- Mark internal APIs with
@internal
JSDoc tag (#104) 4c40b07 - Re-export everything in
overloads.ts
file (#107) 5ee0181 - JSDoc improvements (#100) 0bbeffa
Full Changelog: v0.19.0...v0.20.0