Skip to content

experimental: upgrade to TS Go / Native Preview#3613

Draft
kamranayub wants to merge 2 commits intomainfrom
kamranayub/tsgo
Draft

experimental: upgrade to TS Go / Native Preview#3613
kamranayub wants to merge 2 commits intomainfrom
kamranayub/tsgo

Conversation

@kamranayub
Copy link
Copy Markdown
Member

@kamranayub kamranayub commented Dec 2, 2025

===:clipboard: PR Checklist :clipboard:===

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog entry added (or not needed)

==================

Closes #

Changes:

  • Add @typescript/native-preview package
  • Enable TSGo experimental feature in VS Code
  • Add types:tsgo for testing DTS build

Compare Changes

compare-types-output.zip

Build Types

# Run tsc to output declaration files to `build/types-tsc`
npm run types:tsc

# Run tsgo to output declaration files to `build/types-tsgo`
npm run types:tsgo

I am comparing the folders in WinMerge.

Performance

tsgo is roughly ~5X faster than tsc 🚀

Note

Run each command after npm run clean

tsc

npm run types -- --diagnostics     

> excalibur@0.31.0 types
> tsc --project src/engine/tsconfig.json --declaration --incremental true --tsBuildInfoFile build/dist/.tsbuildinfo --emitDeclarationOnly --diagnostics

Files:              423
Lines:           144893
Identifiers:     154360
Symbols:         156083
Types:            59301
Instantiations:   67656
Memory used:    319107K
I/O read:         0.09s
I/O write:        0.13s
Parse time:       0.72s
Bind time:        0.20s
Check time:       2.17s
Emit time:        0.42s
Total time:       3.51s

tsgo

npm run types:tsgo -- --diagnostics

> excalibur@0.31.0 types:tsgo
> tsgo --project src/engine/tsconfig.json --declaration --incremental true --tsBuildInfoFile build/dist/.tsbuildinfo --declarationDir build/types-tsgo --emitDeclarationOnly --diagnostics

Files:                    424
Lines:                 156480
Identifiers:           156408
Symbols:               203274
Types:                  99613
Instantiations:         94282
Memory used:          212301K
Memory allocs:        1707242
Config time:           0.007s
Parse time:            0.074s
Check time:            0.444s
Emit time:             0.129s
Changes compute time:  0.023s
Total time:            0.677s

Issues

It looks like tsgo is outputting several differences compared to tsc but these might be intentional.

Current State of tsgo

image

Missing JSDoc comments

image

Modified static readonly declarations

image

Added generic type defaults

image

Inconsistent quotes on union types

image

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying excaliburjs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 64dc3d8
Status: ✅  Deploy successful!
Preview URL: https://f51224f8.excaliburjs.pages.dev
Branch Preview URL: https://kamranayub-tsgo.excaliburjs.pages.dev

View logs

@kamranayub
Copy link
Copy Markdown
Member Author

Interesting that the build is stuck? It hasn't even been triggered.

@kamranayub kamranayub mentioned this pull request Dec 4, 2025
5 tasks
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

This PR hasn't had any recent activity lately and is being marked as stale automatically.

@github-actions github-actions Bot added the stale This issue or PR has not had any activity recently label Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue or PR has not had any activity recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant