Description
Add support for the TypeScript NoInfer marker in callable/constructible matchers. The NoInfer utility type (TS 5.4+) prevents TypeScript from inferring a type parameter from a specific position, which is a common pattern in generic APIs.
GitHub issue expect-type #196 tracks the same gap.
Why
Many typed APIs use NoInfer to control inference. If our callable matchers don't handle it, tests silently pass when they should fail. The pattern is especially common in builder/factory APIs.
Acceptance criteria
Risks
- Medium. NoInfer interaction with complex generics can be subtle. May need a dedicated type utility.
Related
Description
Add support for the TypeScript NoInfer marker in callable/constructible matchers. The NoInfer utility type (TS 5.4+) prevents TypeScript from inferring a type parameter from a specific position, which is a common pattern in generic APIs.
GitHub issue expect-type #196 tracks the same gap.
Why
Many typed APIs use NoInfer to control inference. If our callable matchers don't handle it, tests silently pass when they should fail. The pattern is especially common in builder/factory APIs.
Acceptance criteria
Risks
Related
.toBeCallableWith()does not handle theNoInfermarker mmkal/expect-type#196