Anders Hejlsberg: How TypeScript was created

Categories: Product, Startup

Summary

Instead of asking developers to abandon JavaScript for a better language, Anders Hejlsberg chose to fix JavaScript itself—a decision that led to TypeScript. This insight reveals why the most successful developer tools solve ecosystem problems rather than fight against them.

Key Takeaways

  1. Market demand for better tooling drove TypeScript: Outlook.com's team pushed for a C# cross-compiler solution because JavaScript lacked professional IDE support, Visual Studio integration, and type safety—revealing that developers will adopt new tools when existing ones create productivity friction.
  2. Ecosystem lock-in defeats language replacement: Building TypeScript as a superset of JavaScript rather than a replacement was strategically superior. Fighting against the JavaScript ecosystem directly would have guaranteed irrelevance despite technical superiority.
  3. Problem reframing creates innovation opportunities: The team reframed the problem from 'JavaScript is inadequate' to 'how do we improve JavaScript?' This pivot from competition to augmentation became the foundation for TypeScript's eventual dominance.
  4. Developer experience compounds adoption: By leveraging existing Visual Studio infrastructure and C# familiarity rather than building from scratch, TypeScript lowered adoption barriers for enterprise developers while maintaining ecosystem compatibility.

Related topics

Transcript Excerpt

The outlook.com team came to the C Sharp team and asked us whether we would pretty please productize this thing called ScriptSharp. And we go, "Well, what is ScriptSharp?" [music] It's this cross-compiler that allows you to cross-compile C Sharp into JavaScript, such that you can basically treat JavaScript as an instruction language and run your C Sharp apps in a browser. And I'm like, "Well, why would anyone want to do [music] that?" Well, because then you can get a grown-up programming language with grown-up tooling. You can use Visual Studio. You can do all of these wonderful things that you can't do with JavaScript because JavaScript is just a scripting language with shitty tooling. And we were like, "Wow, [music] really? Well, gosh, perhaps a better approach would be to fix JavaScript…

More from Pragmatic Engineer