Skip to main content
πŸ”·

TypeScript

Static typing for JavaScript. Understand the type system deeply β€” not just the syntax.

Topics

Types & Interfaces

Primitive types, object types, interfaces vs type aliases.

Generics

Generic functions, classes, and constraints.

Utility Types

Partial, Required, Pick, Omit, Record, and more.

Type Narrowing

typeof, instanceof, discriminated unions, type guards.
β—† Key Distinction
interface is open (can be merged/extended). type is closed but more expressive (unions, intersections, mapped types). Prefer interface for object shapes, type for everything else.
πŸ’‘ Interview Tip
Know the difference between structural typing (TypeScript) and nominal typing (Java/C#). TS uses structural β€” if it has the right shape, it’s compatible.