🔷

TypeScript

since 2012

JavaScript with superpowers

Created by Anders Hejlsberg (Microsoft)

TypeScript is a typed superset of JavaScript developed by Microsoft. Every valid JavaScript file is also valid TypeScript — but you gain the ability to annotate your code with types, interfaces, and generics. This catches entire classes of bugs before your code ever runs. It's become the standard choice for large-scale web applications.

Typing
Static
Speed
Fast
Learning Curve
Moderate
Paradigm
Object-Oriented +more

// Key Features

Static Type Checking
Catch type mismatches, null errors, and typos at compile time — before they reach production.
JavaScript Compatible
Any JS is valid TS. Adopt gradually, file by file. No rewrite needed.
Powerful Tooling
IDE autocomplete, refactoring, and inline documentation that actually works.
Modern Features
Generics, decorators, mapped types, conditional types — TypeScript pushes the frontier.

// Code Example

typed-api.ts
interface User {
  id: number;
  name: string;
  email: string;
  role: 'admin' | 'user';
}

async function fetchUser(id: number): Promise<User> {
  const res = await fetch(`/api/users/${id}`);
  
  if (!res.ok) {
    throw new Error(`User ${id} not found`);
  }
  
  return res.json() as Promise<User>;
}

// TypeScript catches this mistake at compile time:
// const user = await fetchUser("not-a-number"); ❌
const user = await fetchUser(42); // ✓

// Strengths

  • Catches bugs before runtime
  • Superior IDE experience
  • Easy migration from JavaScript
  • Great for large teams
  • Strong community adoption

// Limitations

  • Adds compilation step
  • Type definitions can get complex
  • Steeper learning curve than JS
  • Requires type definitions for 3rd-party libs

// Where It Shines

Large-scale Web AppsReact / Next.js ProjectsNode.js APIsLibrary DevelopmentTeam-based CodebasesEnterprise Software

// Explore Other Languages

🐍Python
🌐JavaScript
⚙️Rust
🚀Go
← All Languages
// built with curiosity