Upgrade to TypeScript 7 (tsgo)#167
Draft
ask-bonk[bot] wants to merge 1 commit into
Draft
Conversation
Co-authored-by: elithrar <elithrar@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
ask-bonk | e6e6cd8 | Apr 22 2026, 10:57 AM |
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.
Here's a summary of the TypeScript 7 upgrade:
Changes Made
package.json@typescript/native-preview: "beta"-- installs TypeScript 7.0 (tsgo) native compiler (v7.0.0-dev.20260421.2)typescripttonpm:@typescript/typescript6@^6.0.0-- aliases thetypescriptpackage to TS6 compatibility package, so tooling that depends on thetypescriptprogrammatic API (vitest, wrangler, etc.) continues to work. This follows the recommended side-by-side approach from the TS7 blog post."tsc": "tsgo"script -- mapsbun run tsctotsgo, so all existing CI commands (bun run tsc --noEmit) transparently invoke the TS7 native compiler without needing workflow file changes.tsconfig.jsonallowSyntheticDefaultImports: true-- in TS7,esModuleInteropis always assumed true andallowSyntheticDefaultImportscannot be set tofalse, making this setting redundant.modulefrom"es2022"to"esnext"-- aligns with TS7's new default. Thees2022value still works butesnextis the recommended default going forward.Results
tsgo --noEmitpasses with zero errorsWorkflow files -- no changes needed
The
"tsc": "tsgo"script alias inpackage.jsonmeans both.github/workflows/test.yml(line 23:bun run tsc --noEmit) and.github/workflows/deps-update.yml(line 39: prompt referencingbun run tsc --noEmit) will automatically usetsgowithout any modifications. This also avoids theworkflowspermission issue that blocked the previous attempt.Closes #166
github run