TypeScript is being ported to Go. This is known as âTypeScript 7â (it is currently on 5.8). Itâs quite likely that you know this by now, as there have been excellent communications from the TypeScript team. In fact, hats off to the team; itâs been an object lesson in how to communicate well: straightforward, clear, and open.
Thereâs no shortage of content detailing what is known about the port. This piece is not that. Rather, itâs the reflections of two people in the TypeScript community:
ts-loader, the webpack loader for TypeScript. In his day job, he works at Investec, a South African bank, and is based in London. The greatest city on earth (in his opinion)Itâs going to be a somewhat unstructured wander through our reactions and hopes. Buckle up for opinions, thoughts, and feelings.
The Replay is a weekly newsletter for dev and engineering leaders.
Delivered once a week, it's your curated guide to the most important conversations around frontend dev, emerging AI tools, and the state of modern software.
I mean, werenât we happy with each other anyway? Just as we were? Yes, but also no.
If youâve been in the JavaScript/TypeScript ecosystem recently, youâve probably noticed a growing number of tools that support JavaScript development â but are written in other languages. Weâve had esbuild, written in Go. SWC, written in Rust. Bun, written in Zig. Deno, written in Rust.
The list kept growing. All of these tools brought performance gains, which was â and still is â a wonderful thing. Weâll talk more about performance later. One hold-out was TypeScript. It continued to be written in TypeScript. While performance improvements did happen â and were an area of focus for the team â they were incremental, not transformative.
You could sense the impatience in the community, as people started trying to speed up TypeScript by building their own implementations. Most notably, DongYoon Kang, the creator of SWC, implemented the transpilation aspect of TypeScript. He then attempted to build a type checker as well â first in Rust, then in Go, then back to Rust.
That project didnât ultimately succeed, but the fact that people were willing to try showed how strong the demand for better performance had become. A successful port seemed inevitable â and if it didnât come from the TypeScript team, it could have put the ecosystem in a tricky spot. A port to a language other than TypeScript was going to happen eventually. And here we are.
What does the Go port meaningfully change about TypeScript? According to Josh Goldbergâs useful framing, TypeScript is four things:
The language is unaffected by the port. Syntax is unchanged. Youâll still be writing types and interfaces as you were before. There is no difference.
The same applies to the checks that the type checker is performing. The code that was detected as an error before will still fail to type check with TypeScript 7:
const i: number = "not actually a number"; // ts: Type 'string' is not assignable to type 'number'
This is where the differences begin. The type checker, compiler, and language services do change. They become an order of magnitude faster.
Put your hand up if you donât care about performance. Thatâs right â no hands went up. We all care about performance. Whenever you have to work with technology that lags and breaks you out of your flow, you notice it. Itâs basically all you notice.
The TypeScript team has always cared about performance, particularly in the area of development tooling. TypeScript co-creator Anders Hejlsberg has mentioned in interviews the need for language servers to provide fast feedback as people work â something measured in milliseconds, not seconds.
What are the implications of these changes to the TypeScript ecosystem? Put simply, a faster VS Code and faster builds.
At Investec, where John works, there are many engineers who use VS Code and spend part of their engineering life writing TypeScript and JavaScript. All those engineers will benefit from a snappier development experience. When they open up a project in VS Code, the time it takes for the language service to wake up will drop dramatically. As they refactor their code, the experience will be faster. The âtime to red squiggly lineâ metric will decrease. Thatâs a good thing.
As a consequence, engineers should be incrementally more effective, given that there are fewer pauses in their workflow.
The same incremental gain applies to builds. As our engineers build applications, they run TypeScript builds on their machines and in a continuous integration context. These will all be faster than they were before. Weâll continually experience a performance improvement, which is a benefit.
This, of course, is not Investec-specific but a general improvement that everyone will benefit from. Across the world, wherever anyone writes and builds TypeScript, they will do so faster.
Many languages have bootstrapping compilers, meaning the compiler is written in the same language it compiles. TypeScript has followed this model since it was first open sourced. Thatâs about to change: the compiler will no longer be written in TypeScript, but in Go. This may be the first example of a language intentionally moving away from a bootstrapping compiler â and itâs all in the name of performance.
Of all the aspects of the Go port, this, according to John, is the most anxiety-inducing. The TypeScript team will be writing less TypeScript in their day-to-day work. They wonât stop using it, of course, but theyâll certainly be writing more Go and less TypeScript. One implication of this is reduced dogfooding, meaning less direct feedback from the people building the language about what itâs like to use it.
That said, given how broad and active the TypeScript community is, this may not be as concerning as it first seems. The team is highly connected to the community and, even if theyâre writing less TypeScript themselves, there are plenty of others who will continue to provide feedback. Itâs also worth remembering that the TypeScript team has often written the language in ways that donât necessarily reflect how most developers use it. For example, theyâve historically relied heavily on classes (which weâll talk about more below) and, until recently, modules. Before Jake Baileyâs monumental effort to migrate the TypeScript codebase to use modules, it was still using namespaces. That didnât prevent the team from continuing to improve support for modern JavaScript features.
Another potential concern is whether the TypeScript team might become less involved in TC39, the committee responsible for evolving the JavaScript language. The TypeScript team has been instrumental in shaping JavaScript over the years, contributing to features like optional chaining, decorators, and more. As they shift to writing more Go, some have wondered whether their influence on JavaScript might diminish.
Ashley, who is one of Bloombergâs TC39 delegates, isnât worried. Daniel Rosenwasser, the Principal Product Manager for TypeScript, recently became one of TC39âs two incoming facilitators. Ron Buckton, another delegate from the TypeScript team, continues to champion several exciting proposals, such as Explicit Resource Management. The TypeScript teamâs input remains just as important, regardless of what language the compiler is written in.
There are four primary ways to interact with the TypeScript package:
tscimport ts from "typescripttsserverLetâs contemplate how these might change.
tscThere will still be a CLI and it sounds like the goal will be very close compatibility. The implementation may change to be Go, but you would still be able to interact with the CLI in the same way.
import ts from "typescriptThe TypeScript team are still working on this part. There will still be a JavaScript API, though itâs almost certain that there will be changes here. Exactly how different they are is not yet known. One core question is whether the currently synchronous API will need to become asynchronous due to calling Go, as this can be a difficult change to migrate to. The good news is that it looks like it will be able to retain a synchronous API.
tsserverEditors such as VSCode, and even linters, can interact with TypeScript via its language server. Interestingly, even though TypeScript helped inspire the LSP specification, currently, it doesnât actually implement it. The TypeScript team is using the port as an opportunity to align with the LSP specification, which is a positive change.
Tools use one or a combination of the above to use TypeScript on their userâs behalf. There will be work for the tools, but this might be done transparently to the end developer.
Letâs drill further into tools that use TypeScript internally. There will be an impact.
John is the maintainer of ts-loader, a widely used webpack loader for TypeScript. This loader depends upon TypeScript APIs that have been unchanged in years.
In fact, John went so far as to comment on Bluesky in early March:

â only to have the TypeScript team effectively come out and say âhold my beerâ.
Itâs very early days, but we know for sure that the internal APIs of TypeScript (that ts-loader depends upon) will change. To quote Daniel Rosenwasser of the TypeScript team:
While we are porting most of the existing TypeScript compiler and language service, that does not necessarily mean that all APIs will be ported over.
ts-loader has two modes of operation:
Itâs very unlikely that TypeScript 7 will work with ts-loaderâs type checking mode, without significant refactoring. However, itâs quite likely that ts-loader might be able to support transpilation-only mode with minimal changes. This mode only really depends on the transpileModule API of TypeScript. If the transpileModule API lands, then the transpilation-only mode of ts-loader should just work. On the other hand, this might be the natural end of the road for the type checking mode of ts-loader.
Ashley is the author of ts-blank-space, an open-source TypeScript-to-JavaScript transform published by Bloomberg that avoids the need for source maps. It also depends on TypeScriptâs API, so it may be affected by the port. Itâs too early to say, but the change here may turn into an opportunity.
A not-uncommon request of ts-blank-space is to investigate using a different parser. This is because while ts-blank-space itself is very small and only uses TypeScriptâs parsing API, this is not an isolated part of TypeScript, so it still ends up importing the whole type checker. For projects that already depend on TypeScript, there is no added cost, but it makes ts-blank-space less appealing for use cases that are not already importing TypeScript as a library.
Some tooling will have a natural path forward. For instance, typescript-eslint will continue onwards with TypeScript 7. The TypeScript team are planning to help with typed linting with the new, faster APIs. So this means that ESLint, which many people are used to using, will become faster as TypeScript becomes faster.
However, itâs likely tooling that depends upon internal TypeScript APIs, which are going to radically change, may cease to exist in their current forms. This will vary project by project, but expect change. And this is fine â change is a constant.
Once it became clear that TypeScript would no longer be written in TypeScript, people naturally had strong opinions about what language should take its place. Fans of C# wished the team had picked C#, especially given Andersâ involvement with the language. Rust enthusiasts hoped for Rust. The good news for those folks is thereâs still a chance Rust will play a role: the Node.js bindings for TypeScript 7 may use a Rust-based package.
If John had been asked to guess the replacement language ahead of time, he wouldâve said Rust or maybe Zig (which Bun is built with). Go felt like a bit of a leftfield pick â but in hindsight, it makes total sense. ESBuild is written in Go, so thereâs a successful precedent. Go has a garbage collector (unlike Rust), which makes porting the codebase significantly easier. Meanwhile, C# leans heavily on classes, whereas the TypeScript compiler makes only light use of them, so porting to C# would have been an uphill climb.
The choice of Go reflects pragmatism, which has always been at the heart of TypeScriptâs ethos. In fact, if you look at TypeScriptâs official design goals, youâll see it again and again. Perhaps most famously, soundness is listed as a ânon-goal.â Instead, TypeScript aims to strike a balance between correctness and productivity.
Bottom line: pragmatism is the TypeScript way, and Go is a pragmatic choice.
This is evidence that JavaScript can be a slow language in which to implement a type checker. To borrow a line from Andersâ âWhy Go?â post:
No single language is perfect for every task.
Type checking is an intensive task. One way to think about it is that the type checker emulates the execution of a program, line by line, and detecting when that emulation breaks a rule. The larger the program, the more work there is to do.
When the type checker is written in a dynamic language, it requires another program to run it. In TypeScriptâs case, we essentially have a JavaScript engine running the TypeScript checker, which is running an emulation of another program. Itâs no surprise that running the checker natively would be noticeably faster.
Switching to Go brings a reported 10Ă speedup. That gain is roughly split: around 3.5Ă from running natively, and the rest from better parallelization:
Given how much more work it takes to execute code in a dynamic language versus a precompiled native binary, if anything, itâs actually impressive that the difference isnât even greater. That speaks to the extraordinary performance work thatâs gone into V8, the JavaScript engine used by Node.js.
It is possible to write JavaScript programs that work in parallel today, but doing so efficiently often requires low-level APIs like SharedArrayBuffer, which force you to work with raw bytes. Thereâs a Stage 2 proposal to introduce Shared Structs to JavaScript. If that moves forward, it could make it easier to take advantage of multiple cores in JavaScript applications.
Of course, JavaScript still has many strengths. For example:
The ecosystem demanded a faster TypeScript. Performance cannot be ignored these days. As a consequence, some kind of port of TypeScript was bound to happen. If we accept that view, then what next? Well, the way that the TypeScript team has started executing on the migration fills us with confidence. The TypeScript team are talented, they are pragmatists and their choices are wise.
This is going to Go well.
Thanks to Jake Bailey, of the TypeScript team, for reviewing this piece â greatly appreciated! Also to Josh Goldberg for writing up his classification of what makes up TypeScript; many thanks!
LogRocket lets you replay user sessions, eliminating guesswork by showing exactly what users experienced. It captures console logs, errors, network requests, and pixel-perfect DOM recordings â compatible with all frameworks, and with plugins to log additional context from Redux, Vuex, and @ngrx/store.
With Galileo AI, you can instantly identify and explain user struggles with automated monitoring of your entire product experience.
Modernize how you understand your web and mobile apps â start monitoring for free.

:has(), with examplesThe CSS :has() pseudo-class is a powerful new feature that lets you style parents, siblings, and more â writing cleaner, more dynamic CSS with less JavaScript.

Kombai AI converts Figma designs into clean, responsive frontend code. It helps developers build production-ready UIs faster while keeping design accuracy and code quality intact.

Discover what’s new in The Replay, LogRocket’s newsletter for dev and engineering leaders, in the October 22nd issue.

John Reilly discusses how software development has been changed by the innovations of AI: both the positives and the negatives.
Would you be interested in joining LogRocket's developer community?
Join LogRocketâs Content Advisory Board. Youâll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.
Sign up now