TypeScript for CLIs: why so many teams choose it (and why it's not what you think)
When Microsoft shipped the Azure CLI, or when Google chose TypeScript for Gemini CLI, the inevitable question surfaced in every forum: why TypeScript? Isn't it slow? The question itself reveals a m...

Source: DEV Community
When Microsoft shipped the Azure CLI, or when Google chose TypeScript for Gemini CLI, the inevitable question surfaced in every forum: why TypeScript? Isn't it slow? The question itself reveals a misunderstanding worth unpacking fully. TypeScript isn't chosen for CLIs because of its performance. It's chosen in spite of its performance not being best-in-class. And paradoxically, that's exactly what makes it the right call for many teams. 🏎️ The performance myth Let's start with the most important point: TypeScript doesn't run. The code you write gets transpiled to plain JavaScript, which then executes on a runtime like Node.js (V8), Deno, or Bun. The end result at runtime is practically identical to writing JavaScript by hand. If the goal were raw performance, the debate would be between Go, Rust, > and C++. TypeScript wouldn't even be in the conversation. And yet, it is in the conversation. Constantly. Because performance is rarely the real bottleneck in a client tool. What actuall