Union of subject-input types drawn from every assertion in AllAssertions
that share a leading phrase with Partsand take overlapping parameters.
When two assertions share a leading phrase (for example
functionResolveAssertion and promiseResolveAssertion both accept 'to resolve'), the runtime .it('to resolve') executor dispatches to whichever
matches the actual subject shape. This type mirrors that reality at the type
level by widening the subject to a union of every possible input.
A shared phrase alone is not enough: the numeric and string assertions both
own 'to be greater than', but .it('to be greater than', 5) can only ever
be satisfied by the numeric one. Siblings whose parameters cannot overlap
with those of Parts are therefore excluded.
This works per overload rather than per call, so an assertion with several
aliases still matches siblings that share any one of them. Narrowing by the
alias actually typed would need a signature generic over the call's
arguments, which breaks inference when .it() is nested inline in another
call's arguments (e.g. expect(x, 'to satisfy', { a: expect.it(...) })).
Union of subject-input types drawn from every assertion in
AllAssertionsthat share a leading phrase withPartsand take overlapping parameters.When two assertions share a leading phrase (for example
functionResolveAssertionandpromiseResolveAssertionboth accept'to resolve'), the runtime.it('to resolve')executor dispatches to whichever matches the actual subject shape. This type mirrors that reality at the type level by widening the subject to a union of every possible input.A shared phrase alone is not enough: the numeric and string assertions both own
'to be greater than', but.it('to be greater than', 5)can only ever be satisfied by the numeric one. Siblings whose parameters cannot overlap with those ofPartsare therefore excluded.This works per overload rather than per call, so an assertion with several aliases still matches siblings that share any one of them. Narrowing by the alias actually typed would need a signature generic over the call's arguments, which breaks inference when
.it()is nested inline in another call's arguments (e.g.expect(x, 'to satisfy', { a: expect.it(...) })).