✅ Spec primitive union matchers

Type-driven tests: every expectTypeOf pairs an assert, covering the
header matrix (exhaustive vs partial patterns, strict R vs widened
returns, string and numeric keys, _ fallback wiring).

Negative cases use Parameters<typeof factory>[0] assignability because
expect-type's .not.toBeCallableWith collapses to never on these generic
Simplify<>-wrapped signatures.

Same documented expectTypeOf floating-promise false positive as
index.test.ts, so the same file-level disable applies; testing.md
known-issue updated to list both files.
This commit is contained in:
tmu committed 2026-09-16 14:52:30 +00:00
1 parent 40bf652b97
commit a25ac6d1e2
2 files changed
+130 -1

No files matched your search

+2 -1
View File
@@ -39,7 +39,8 @@ build step, and the runner relies on the `.ts` import-extension convention (see
## Known issues
- The type-aware linter misidentifies `expectTypeOf()` as a floating promise, so
`src/index.test.ts` carries a file-level `oxlint-disable
test files that use it (`src/index.test.ts`, `src/primitive.test.ts`) carry a
file-level `oxlint-disable
typescript/no-floating-promises` with an explanatory comment. It is a known
false positive, not a rule worth disabling project-wide (see
[tooling.md § oxlint-disable directives live next to the code](./tooling.md#oxlint-disable-directives-live-next-to-the-code)).