Context
TypeScript 5.9 was provisionally added to the test-types CI matrix when expanding from ['5.0', '5.1', '5.2'] to broader coverage, but was dropped before merge because pnpm test:ts (tsc --noEmit) fails on it.
The repo currently develops against 5.7.2 and the matrix has been updated to ['5.0', '5.4', '5.7']. This issue tracks restoring 5.9 once the failures below are addressed.
Reproduction
pnpm install --frozen-lockfile
pnpm build-ci
pnpm add -w typescript@5.9
pnpm test:ts
tsc --version → 5.9.3.
Failure output
packages/core/src/helpers.ts(19,43): error TS2322: Type 'T' is not assignable to type 'T extends AnyFn<any, infer U> ? U : T'.
packages/core/src/helpers.ts(55,9): error TS2322: Type 'undefined' is not assignable to type 'T[P]'.
'undefined' is assignable to the constraint of type 'T[P]', but 'T[P]' could be instantiated with a different subtype of constraint 'any'.
packages/core/src/helpers.ts(188,7): error TS2322: Type 'any[]' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'any[]'.
packages/shared/src/helpers.ts(71,15): error TS2322: Type 'never[]' is not assignable to type 'Arrify<Exclude<T, void>>'.
packages/shared/src/helpers.ts(71,45): error TS2322: Type 'T[]' is not assignable to type 'Arrify<Exclude<T, void>>'.
All five come from tightened conditional-type narrowing in 5.9 — the spring engine leans on any deliberately, so some of these are likely intentional escape hatches that 5.9 now refuses to infer through.
Definition of done
- Failures resolved in source (preferred) or scoped behind narrowly-targeted
@ts-expect-error annotations with a TS-5.9-specific comment.
pnpm test:ts clean on 5.9.
5.9 added back to the matrix.ts array in .github/workflows/tests.yml.
Context
TypeScript 5.9 was provisionally added to the
test-typesCI matrix when expanding from['5.0', '5.1', '5.2']to broader coverage, but was dropped before merge becausepnpm test:ts(tsc --noEmit) fails on it.The repo currently develops against
5.7.2and the matrix has been updated to['5.0', '5.4', '5.7']. This issue tracks restoring 5.9 once the failures below are addressed.Reproduction
tsc --version→5.9.3.Failure output
All five come from tightened conditional-type narrowing in 5.9 — the spring engine leans on
anydeliberately, so some of these are likely intentional escape hatches that 5.9 now refuses to infer through.Definition of done
@ts-expect-errorannotations with a TS-5.9-specific comment.pnpm test:tsclean on 5.9.5.9added back to thematrix.tsarray in.github/workflows/tests.yml.