8 min left
Back to Series

The Stack > Article 33 | Intermediate | 8 min read

Article 33Intermediate8 min read

Anders Hejlsberg on TypeScript, AI, and the compiler that changed the stack

Anders Hejlsberg argues that TypeScript won because it improved JavaScript without breaking the ecosystem, while AI makes typed tooling more valuable rather than less.


TypeScript compiler and AI coding tooling represented as a developer stack

The latest Anders Hejlsberg conversation is a good reminder that the most important software story is not “which language wins,” but which language becomes the default interface for real people doing real work. In the TypeScript story, that meant fixing JavaScript without trying to replace the whole ecosystem.

He has said, repeatedly, that TypeScript’s success came from a simple idea: improve JavaScript, do not fight it. That is why the language spread. It gave teams better tooling, stronger editor support, and more predictable refactors while keeping the browser, Node, and the broader JavaScript ecosystem intact.

The latest commentary is even more interesting because it connects TypeScript to the AI era. He argues that the future is not “less typing, less structure, less tooling,” but more of the things that make code understandable and checkable by both humans and models.

The best language for AI is often the one that gives the system the most information about intent and constraints, not the one with the most exotic syntax.

That is the heart of the TypeScript argument.


Why TypeScript won: it fixed the actual developer bottleneck

Hejlsberg’s core point is that TypeScript did not become dominant because it was a “better language” in the abstract. It became dominant because it solved a problem that JavaScript developers actually had: large codebases, tool ergonomics, refactoring, and the mismatch between dynamic runtime code and static developer intent.

He has also been very clear that TypeScript was not trying to target machine code or optimize the runtime. It was built for the developer experience. It was a compiler for tooling.

That is a significant distinction. A traditional compiler optimizes generated assembly or bytecode. TypeScript optimizes the human loop: statement completion, error feedback, navigation, refactoring, and the ability to reason about a large surface area without running the full application.

That is why it felt so natural inside editors and IDEs. It fit the way teams already worked.

The broader lesson is important: the highest-leverage tooling often does not look like a runtime improvement. It looks like better signal for the person writing, reviewing, and maintaining the software.


The compiler rewrite: raw speed, not just syntax sugar

He also discussed the native TypeScript rewrite in Go and why it matters. The short version is not glamorous, but it is important: JavaScript was not a good runtime for a large, compute-intensive compiler. It had speed limits, poor concurrency primitives, and too little leverage from multi-core machines.

That is why the project moved toward native code and a model that made shared-memory concurrency more viable.

This matters because a lot of modern engineering drama around tooling gets framed as “the language is better.” But the real story is often more boring and more practical: the workload changed. TypeScript scales to giant codebases, and its compiler has to keep up with them.

The JavaScript-to-native rewrite is a reminder that the problem is not only how elegant a language is. It is whether the implementation can serve real-world workloads without bottlenecking the developer loop.

In other words, good language tooling is an operational concern. It needs to be fast enough to feel invisible.


Why AI makes typed tooling more valuable, not less

The most relevant part of Hejlsberg’s latest thinking is his view on AI and software engineering. He does not argue that AI will replace engineers. Instead, he says it will make the languages and toolchains with the richest structural information more valuable.

That is a strong argument for TypeScript.

Large language models are better at languages and codebases that are already highly structured. They can do better work when the code has explicit types, constrained interfaces, and discoverable contracts. If JavaScript is a loose set of runtime behaviors, TypeScript is a map that helps the model reason about the problem space before it starts generating code.

This is not just a theoretical preference. It is why many AI workflows started to prefer TypeScript even when JavaScript was technically “enough.” The typed layer creates better guardrails and better static validation before code hits the runtime.

Hejlsberg’s broader point is even sharper: AI does not eliminate the need for compilers, IDEs, and language services. It increases the value of them.

When an agent is generating code in the background, the system needs fast semantic search, good refactoring, and reliable type-checking. If a toolchain is slow or semantically shallow, it becomes the bottleneck that slows every generated patch.

The AI era has made this more obvious. Speed matters because the model is now hammering the compiler and the editor continuously, not once per developer keystroke.


TypeScript as the default language of the AI-native stack

There is a subtle but important point in Hejlsberg’s comments: the languages that win in the AI age are often not the “most experimental” ones. They are the ones with the largest ecosystem footprint, the most examples in training data, and the best developer tooling around them.

This is why TypeScript can become even more central. It is already embedded in the tooling stack that modern software teams rely on. It is familiar to AI systems trained on huge repositories. It gives developers a layer of explicit structure without abandoning the JavaScript ecosystem.

That is the real strategic advantage.

The stack is not becoming less typed because AI is more powerful. It is becoming more typed because the agentic loop needs signals. Models write more code in the languages they can reason about correctly and safely. TypeScript gives them a better contract than raw JavaScript.

This helps explain why TypeScript has become a default language for both developer productivity and AI-assisted software creation.


What this means for builders

For teams building software today, the lesson is practical:

  • Do not treat type systems as a luxury.
  • Treat them as a way to make the agentic workflow more reliable.
  • Favor tooling that supports semantic navigation, fast type-checking, and clear contracts.
  • Recognize that AI is not replacing the need for good system design; it is increasing the need for explicit interfaces.

If an application is being generated or assisted by AI, then the compiler and editor become part of the runtime of the product team. They are not just developer conveniences. They are operational infrastructure.

That is why TypeScript’s rise still matters, even in an age when the conversation keeps circling around the next model or the next agent framework.


Conclusion

Hejlsberg’s latest comments land in a precise place: the future of software engineering is not “less structure.” It is more structure, better tooling, and better understanding of what the system is doing.

TypeScript won because it improved the JavaScript ecosystem without breaking it. It is now being reinforced by AI because typed code is easier for both humans and models to reason about. And the compiler, once a niche engineering concern, is becoming a critical part of the product development loop.

That is the real story behind the TypeScript resurgence. It is not just a language story. It is a tooling story, a productivity story, and increasingly an AI story.


TypeScriptAnders HejlsbergcompilerAI codinglanguage designMicrosoft

Up next in the series

Article 34Live

Brazil’s tokenized bond test is really about regulatory infrastructure

Itaú’s pilot for tokenized bonds is less about hype and more about making financial rules explicit, auditable, and executable in software.

tokenizationbondsfintechregulation