Ajax玉兔Ajax玉兔AJAX.BLOG
Back to all posts
August 15, 20266 min read

Why TypeScript Is Non-Negotiable: A Developer Who Doesn't Know TS Isn't a Programmer

This isn't a hot take—it's an engineering judgment. From million-line codebases to today's hottest AI Agent frameworks, TypeScript has already become the industry's default language. This article makes the case with facts.

TypeScriptJavaScriptAI

The Bottom Line

A developer who doesn't know TypeScript is, today, not a qualified developer.

That sounds harsh, but it isn't my invention—it's the result of the market voting with its feet. To judge whether a technology is truly essential, don't look at bootcamp ads; look at two things: what large projects choose, and what the newest wave of technology runs on. On both counts, TypeScript has won.

1. What Large Projects Have Already Answered

1. VS Code: A Unanimous Vote at a Million Lines

Microsoft's VS Code is one of the largest open-source codebases on the planet—over a million lines, almost 100% TypeScript. This isn't an experiment; it's the productivity foundation of the entire Microsoft stack: VS Code itself, the Monaco Editor, Playground, and a long list of Azure tooling—all TypeScript.

The technology choice behind a million-line project isn't about looking cool—it's about maintainability on a ten-year horizon. JavaScript's dynamic types are freedom at five thousand lines and debt at five hundred thousand. Microsoft bet on TypeScript starting from version 1.0, and in hindsight it's one of the company's best technical decisions of the last decade.

2. The Major Frameworks Have All Defected

Look back at how frontend frameworks have evolved, and it's essentially a one-way street from JS to TS:

ProjectStatus
AngularTS-first since 2.0; the docs default to TypeScript
Vue 3Core rewritten in TypeScript; the official Composition API is optimized for TS
Nest.jsA server-side framework whose design philosophy is "Angular's TypeScript discipline, ported to Node"
DenoA TS/JS-native runtime from day one
Prisma / tRPC"Type-driven" is the selling point itself: change one schema, and types sync across the whole chain

Even Vue, famous for being lightweight and zero-build, swapped its core for TypeScript in 3.0. The direction the frameworks have voted with their feet is the direction newcomers should learn.

3. Internal Standards at the Big Tech Companies

Google has long run a TypeScript-first frontend stack internally; Meta's React ecosystem tooling (Babel, Metro, and React's own new code) has gone all-in on TypeScript. When the largest codebases in the world collectively pick a language, it proves exactly one thing: at scale, the benefits of types outweigh their cost.

2. The Threefold Value of a Type System

Enough about the popularity contest—here's what's practical. For an ordinary developer, TypeScript's value comes in at least three layers, each compounding the last.

1. Types Are Documentation That Never Goes Stale

In JavaScript, the function signature is function update(payload)—what belongs inside payload is known only to the caller. TypeScript writes the contract into the signature:

ts
interface UpdatePayload { noteId: string; content?: string; tags?: string[]; }

"How to use this function" now has a single authoritative answer—and the compiler enforces that answer, so unlike a comment, it never goes stale.

2. Move Errors from Runtime to Compile Time

The JavaScript error loop is: write a bug → refresh → console → fix. In the worst case, the user finds it first. TypeScript's strictNullChecks turns "this might be null" into a proposition you must handle the moment you write the code:

ts
// Under strictNullChecks, the compiler forces you to handle the case where user doesn't exist function greet(user: User | null): string { return user ? `你好,${user.name}` : "访客"; }

One production incident costs the trust of N users; catching errors at compile time moves that cost from production back to development.

3. Refactoring: From a Gamble to a Process

I once did a state-management refactor on a project I maintain. If it had been a JavaScript project, I wouldn't have dared—dozens of files, hundreds of call sites, and after the changes you'd have to manually click through every single page. TypeScript offers a different workflow: change the interface definition → the compiler underlines every affected location across the project → fix them one by one → and when the build passes, you know nothing slipped through.

3. The Agent Era: TypeScript Is the Native Language of Agents

If large projects adopting TypeScript proves its present, the AI Agent wave proves its future. Look at what languages the hottest Agent stacks today are written in:

TechnologyLanguageStanding
Vercel AI SDKTypeScriptThe de facto standard for connecting the frontend to LLMs
LangChain.jsTypeScriptLangChain's official JS/TS branch
MCP (Model Context Protocol) official SDKTS is a first-class citizenThe standard protocol for Agents to connect to external tools
Mastra / VoltAgent / CopilotKitTypeScriptThe new generation of Agent frameworks is almost entirely TS-first

Why is the Agent ecosystem so tightly bound to TypeScript? Three reasons, and each one comes back to the essence of type systems.

1. Tool Call Parameters Need a "Machine-Readable Contract"

An Agent's core action is calling tools (function calling). The LLM decides which tool to call and what arguments to pass—the argument structure must be described precisely in the prompt and validated precisely in code. A TypeScript interface is a natural parameter schema: humans can read it, LLMs can read it, and the compiler validates your implementation against it:

ts
interface SearchNotesTool { name: "search_notes"; parameters: { keyword: string; tags?: string[]; limit?: number; // 1-20 }; }

2. Structured Output = Type Constraints

Getting an LLM to "output some JSON" is an old problem; getting it to "output JSON that matches a business structure" is a new must-have. Vercel AI SDK's generateObject with a zod schema is, in essence, trading type definitions for determinism: the model is constrained to a structure, and the parsing code has types backing it up, so you don't need to write piles of defensive checks.

3. Agents Live on the Web

Most Agent products have a web-based interaction layer. Tools need to connect the frontend and Node services, and TypeScript is the lingua franca of that chain—the hotter Agents get, the more secure TypeScript's position becomes.

My Take

The reliability of an Agent application = model capability × engineering constraints. The model capability belongs to someone else; the engineering constraints belong to you—and the type system is the most cost-effective constraint tool you have.

4. Answering the Objections

"I've written JS for over a decade and it's been fine." Yes, JavaScript is great, but "fine" and "scales" are two different things. Personal scripts and a few dozen lines of prototype—JS is still the best tool. But as soon as the code will be read by a second person, or modified a second time, it's time for TypeScript.

"TypeScript compiles slowly and configuring it is a pain." In the Turbopack / esbuild era, type checking already runs in parallel with builds; the pain of one tsconfig.json lasts ten minutes, and the payoff lasts the lifetime of the project.

"Agents use Python more." Model training does happen in Python, but the Agent application layer—tool definitions, orchestration, and interactive interfaces—is being rapidly taken over by TypeScript. And the argument here has never been "TypeScript rules the world"; it's "if you don't know TypeScript, you've eliminated half the positions available to you."

Summary

  • Large projects have voted with their feet: VS Code's million lines, the Vue 3 / Angular / Nest stack, all TS-first
  • The threefold value of types: documentation, a defensive line, and the courage to refactor
  • The Agent wave pushes TypeScript further forward: tool contracts, structured output, and the web platform are all home turf for types

"No TypeScript, no programmer"—the real meaning of that phrase isn't "you're garbage"; it's that this industry now treats TypeScript as basic infrastructure, like English—and infrastructure is not up for negotiation.

Next up, the practical side: "How to Migrate from JS to TypeScript Fast: An Incremental Path, Not a Rewrite"—no rewrite, no downtime, one step at a time.