TypeScript Dethroned Python: Why It's Now the Most Used Language on GitHub

Introduction
For years, the language leaderboards felt settled. Python owned the AI/ML space and beginner education. JavaScript owned the web. Java owned enterprise. And the rankings fluctuated, but the overall structure was stable.
Then in 2024, something shifted. TypeScript — the statically-typed superset of JavaScript that Microsoft shipped in 2012 — crossed Python to become the most-used language on GitHub by repository count. By late 2025, the gap had widened. Pull requests, contributors, and ecosystem growth all pointed in the same direction.
This is not a story about which language is "better." Python isn't going anywhere — it remains dominant in data science, machine learning research, scripting, and beginners' education, and it will for the foreseeable future. This is a story about why TypeScript is growing faster than any major language in the ecosystem, what changed, and what it means for developers making technology choices in 2026.

What TypeScript Actually Is
TypeScript is not a replacement for JavaScript. It compiles to JavaScript. Every valid JavaScript program is a valid TypeScript program. TypeScript adds one thing on top of JavaScript: a static type system.
// JavaScript — no type information
function calculateInterest(principal, rate, years) {
return principal * rate * years;
}
// TypeScript — types make intent explicit and errors visible at compile time
function calculateInterest(
principal: number,
rate: number,
years: number
): number {
return principal * rate * years;
}
// TypeScript catches this at compile time — JavaScript only at runtime
calculateInterest("10000", 0.05, 3); // Error: Argument of type 'string' is not assignable to parameter of type 'number'
The type system catches entire categories of bugs before your code runs. The wrong type of value passed to a function. A property accessed on an object that might be null. An API response with a different shape than expected. In a dynamically typed language, these become runtime errors — exceptions in production. In TypeScript, they become compile-time errors — problems you see before you ever ship.
This is TypeScript's core value proposition. It's not about performance (TypeScript compiles to the same JavaScript that runs everywhere). It's about catching mistakes earlier, reasoning about code more confidently, and enabling editor tooling that makes large codebases navigable.
Why TypeScript Is Growing
The acceleration in TypeScript adoption has multiple contributing factors, but three are primary.
The Scale Problem Became Universal
TypeScript was originally designed for large JavaScript codebases where the lack of types became a maintenance burden. That context applied to Microsoft, Google, and large enterprises. Then the web expanded.
In 2015, a "large JavaScript codebase" meant 50,000+ lines at a major tech company. By 2024, startups with 5 engineers had frontend codebases that large. React applications grew into full SPAs with complex state management. Node.js backends handled enterprise business logic. The scale problem that TypeScript was built to solve became everyone's problem.
The AI Coding Tools Amplified the Gap
When AI coding assistants (Copilot, Cursor, Claude Code) generate code suggestions, they work better with TypeScript than with JavaScript. Type information gives the AI model more context: when you type user., the AI knows exactly what properties user has and can give more accurate completions. When you write a function signature with typed parameters, the AI understands what you're trying to do and generates better implementations.
This created a feedback loop: AI tools work better with TypeScript → developers who use AI tools prefer TypeScript → more TypeScript code in training data → AI tools get even better at TypeScript. The advantage compounded.
Framework Adoption Made It the Default
The major frameworks that developers use every day now ship with TypeScript support as the default, not an optional add-on.
Next.js: Create Next App prompts for TypeScript by default. The official documentation shows TypeScript examples first. The community expectation is TypeScript.
Angular: has used TypeScript as its primary language since version 2 in 2016. For Angular developers, TypeScript is not a choice — it's the baseline.
NestJS: the backend framework for Node.js that's closest in spirit to Spring Boot or ASP.NET, built entirely in TypeScript. Growing rapidly in enterprise Node.js adoption.
tRPC: type-safe RPC framework that uses TypeScript inference to ensure your frontend and backend stay in sync — impossible to implement without TypeScript.
Prisma: the ORM that generates a full TypeScript type for your database schema. Your query results are fully typed based on your actual database columns. This was a step-change improvement over working with untyped query results.
What TypeScript Does Better Than JavaScript
Types as Documentation
TypeScript types serve as machine-readable documentation that never goes out of date. A function signature like:
interface User {
id: string;
email: string;
createdAt: Date;
role: 'admin' | 'member' | 'viewer';
subscription?: {
plan: 'free' | 'pro' | 'enterprise';
expiresAt: Date;
};
}
async function updateUserRole(
userId: string,
newRole: User['role'],
requestedBy: User
): Promise<User> {
// implementation
}
tells you exactly what the function accepts, what each parameter must look like, what it returns, and what states each field can be in — with compiler enforcement. In JavaScript, this information lives (if it lives at all) in a README that may or may not be current.
Refactoring at Scale
One of the most practical advantages: TypeScript makes large refactors safe. When you rename a function, change its signature, or restructure a data type, the TypeScript compiler immediately shows you every location that needs to be updated. In a JavaScript codebase, the equivalent is running the application and waiting for it to crash.
// Before: User.name was a string
interface User {
name: string;
}
// After: Splitting into firstName and lastName
interface User {
firstName: string;
lastName: string;
// name: string; ← removed
}
// TypeScript immediately shows every file referencing user.name
// as an error — you fix them all before merging
Advanced Type Patterns
TypeScript's type system has become sophisticated enough to model complex domain logic at the type level, catching logical errors before runtime:
// Discriminated unions model state machines at the type level
type PaymentState =
| { status: 'pending' }
| { status: 'processing'; startedAt: Date }
| { status: 'completed'; completedAt: Date; transactionId: string }
| { status: 'failed'; failedAt: Date; reason: string };
function handlePayment(payment: PaymentState) {
switch (payment.status) {
case 'completed':
// TypeScript knows transactionId exists here
sendReceipt(payment.transactionId);
break;
case 'failed':
// TypeScript knows reason exists here
logFailure(payment.reason, payment.failedAt);
break;
}
}
What Python Still Does Better
TypeScript's growth doesn't make Python obsolete. Python retains significant, durable advantages in specific domains.
AI and machine learning research: PyTorch, TensorFlow, JAX, Hugging Face transformers — the ML ecosystem is built in Python. Type annotations exist in Python (via mypy), but the ecosystem's momentum and tooling are deeply Python-centric. Researchers and data scientists who need to train models, run experiments, and write papers will use Python for the foreseeable future.
Data engineering and analysis: Pandas, NumPy, Polars, DuckDB, dbt, Jupyter notebooks — the data engineering stack is Python-native. The interactive nature of Jupyter and the exploration-oriented workflow of data analysis suits Python's syntax and ecosystem.
Scripting and automation: Python's readability and standard library make it the language of choice for scripts, automation, and system administration tasks. For a 50-line script that parses some files and sends an alert, TypeScript's compilation step is friction without benefit.
Scientific computing: SciPy, matplotlib, scikit-learn, and the broader scientific Python stack have no TypeScript equivalents that match their depth or adoption.
The right mental model: TypeScript is dominant where the product is a web service, API, or frontend application — the business logic layer of software. Python is dominant where the product is an analysis, a trained model, or a data pipeline.
The Myth of Python's AI Advantage in Application Development
There's a common misconception worth addressing: because the ML ecosystem is Python-centric, AI applications should be built in Python.
This confuses two different layers. The model training and inference layer (PyTorch, transformers, vLLM) is Python. The application layer that calls those models via API is not constrained to Python at all. In 2026, most production AI applications don't train their own models — they call Claude, GPT-4o, Gemini, or a fine-tuned model via HTTP API. That API call is equally natural from TypeScript, Go, Rust, or any other language.
The most common production architecture: TypeScript/Node.js (or Go, or Rust) application → HTTP call to AI inference endpoint → Python-based inference service. The TypeScript layer handles the product logic, user sessions, database access, and API routing. The Python layer handles model inference. Each language does what it's best at.
This pattern, sometimes called the "inference tier / application tier split," gives you the benefits of TypeScript's type safety, tooling, and ecosystem for the product code without sacrificing Python's dominance in the model layer.
Production Considerations
Migration paths: if you have an existing JavaScript codebase, TypeScript migration can be done incrementally. Start by adding "allowJs": true to your tsconfig.json — this lets TypeScript and JavaScript files coexist. Rename files to .ts one at a time, adding types as you go. The compiler will guide you with errors for each newly typed file.
TypeScript in the build pipeline: TypeScript adds a compilation step. For production, use tsc --noEmit for type checking and esbuild or swc for the actual compilation (they're dramatically faster than tsc for emit). Modern bundlers (Vite, Turbopack) handle this transparently.
tsconfig.json strictness settings: TypeScript's default settings are permissive for migration convenience. For new projects, enable strict mode from the start:
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true
}
}
strict: true enables the full set of type-checking rules including strictNullChecks (which catches the most bugs). The other two options catch additional classes of errors that strict misses.
Type-safe APIs end-to-end: the most powerful TypeScript architecture pattern in 2026 is end-to-end type safety — the same TypeScript types describe your database schema, your API contracts, and your frontend components. Tools like tRPC, Prisma, and Zod make this practical. When your database schema changes, the TypeScript compiler shows you every place in the frontend that needs to be updated.
Conclusion
TypeScript's rise to the top of the GitHub charts is not a trend — it's the outcome of a decade of gradual adoption reaching a tipping point. The type system that seemed like unnecessary overhead for small scripts turned out to be essential infrastructure for the complex applications that developers are now building.
Python isn't going anywhere. If you're working with data, training models, or writing analysis code, Python is still the right tool. But if you're building web services, APIs, full-stack applications, or anything that will be maintained by a team over years, TypeScript's value proposition has become hard to argue against.
The developer who understands both — who knows when to reach for TypeScript's type safety and when Python's flexibility and ecosystem are the right fit — is positioned well for the rest of this decade.
Sources & References
1. GitHub — "The State of the Octoverse 2025" — https://octoverse.github.com/
2. Stack Overflow — "Developer Survey 2025" — https://survey.stackoverflow.co/2025/
3. TypeScript Handbook — https://www.typescriptlang.org/docs/handbook/
4. Matt Pocock — "Total TypeScript" — https://www.totaltypescript.com/
5. tRPC Documentation — https://trpc.io/docs
6. Prisma — "Type-Safe Database Access" — https://www.prisma.io/docs
Enjoyed this post? Follow AmtocSoft for AI tutorials from beginner to professional.
☕ Buy Me a Coffee | 🔔 YouTube | 💼 LinkedIn | 🐦 X/Twitter
Comments
Post a Comment