{{ message }}
feat: update TypeScript support to 5.8 - 6.0 - #18332
Open
WikiRik wants to merge 2 commits into
Open
Conversation
Contributor
WikiRik
force-pushed
the
WikiRik/typescript-6
branch
2 times, most recently
from
September 3, 2026 13:13
7b11666 to
e223edd
Compare
WikiRik
force-pushed
the
WikiRik/typescript-6
branch
from
September 3, 2026 16:33
e223edd to
44cda1a
Compare
WikiRik
force-pushed
the
WikiRik/typescript-6
branch
from
September 3, 2026 17:53
44cda1a to
5a0b25c
Compare
WikiRik
force-pushed
the
WikiRik/typescript-6
branch
from
September 3, 2026 20:14
5a0b25c to
a74d1e6
Compare
WikiRik
commented
Sep 3, 2026
Move the supported range up to 5.8, 5.9 and 6.0, and build on 6.0.2. TypeScript 6.0 rejects `ConstraintChecking.DEFERRED` and `IMMEDIATE` as they were written, with "Property '#constraints' of exported anonymous class type may not be private or protected" (TS4094). Both were class expressions passed straight to `classToInvokable` inside a static property initializer, so the type they produce has no name to refer to, and a private field cannot be described in the emitted declarations without one. Give them named declarations outside the class body and keep the static accessors as the documented entry points, so the class names, and the descriptions the documentation points at, are preserved. Note that this turns `DEFERRED` and `IMMEDIATE` from enumerable static data properties into accessors, so they no longer show up in `Object.keys` or a spread of `ConstraintChecking`. Both are still reached the same way. Cover the two with unit tests in `packages/core/test/unit/deferrable.test.ts`: accessor identity, name preservation, construction with and without `new`, frozen constraints, and `isEqual`, including that the two are never equal to each other. Drop the `@ts-ignore` comments that newer compilers no longer need, and turn the two in the data types test into `@ts-expect-error`, which is what they were waiting to become. The CLS test gains an explicit `id` declaration, which 6.0 needs to infer the model's creation attributes. TypeDoc must have moved to 0.28 first; 0.27 refuses to run on TypeScript 6.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EgPPfqYYk6PFGbanp5mAFh
Co-authored-by: Rik Smale <13023439+WikiRik@users.noreply.github.com>
WikiRik
force-pushed
the
WikiRik/typescript-6
branch
from
September 3, 2026 20:18
09453a2 to
bb3309c
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull Request Checklist
Description of Changes
Top of the stack, stacked on #18331.
Moves the supported TypeScript range up from
5.5–5.8to5.8,5.9and6.0, and builds on6.0.2.ConstraintChecking had to be restructured
TypeScript 6.0 rejects
ConstraintChecking.DEFERREDandIMMEDIATEas they were written:Both were class expressions passed straight to
classToInvokableinside a static property initializer, so the type they produce has no name to refer to, and a private field cannot be described in the emitted declarations without one. They now have named declarations outside the class body, with the static accessors kept as the documented entry points — which preserves both the class names and the descriptions the generated docs point at.cls.test.tsalso gains an explicitdeclare id: CreationOptional<number>, which 6.0 needs to infer the model's creation attributes.This is the one non-mechanical change in the PR, so it is covered by new unit tests in
packages/core/test/unit/deferrable.test.ts: accessor identity, name preservation, construction with and withoutnew, frozen constraints, andisEqual(including thatDEFERREDandIMMEDIATEare never equal to each other).Everything else is mechanical
The
@ts-ignorecomments that newer compilers no longer need are dropped, and the two in the data types test become@ts-expect-error— which is what their own comments said they were waiting to be:Ordering
TypeDoc had to reach 0.28 first (#18331); 0.27 refuses to run on TypeScript 6.0 and
docsis a required CI job.Verification
yarn build,yarn test-unit(2220 passing),yarn test-typingsacross all 13 projects, andyarn docswith no warnings — all on TypeScript 6.0.2.🤖 Generated with Claude Code
https://claude.ai/code/session_01EgPPfqYYk6PFGbanp5mAFh