JS Guide
HomeQuestionsTopicsCompaniesResources
BookmarksSearch

Built for developers preparing for JavaScript, React & TypeScript interviews.

ResourcesQuestionsSupport
HomeQuestionsSearchProgress
HomeTopicstypescript

typescript

TypeScript types, generics, and advanced type programming

0 of 15 topics read0%

5 Topics

beginner
TypeScript Fundamentals
beginner
8 min
TypeScript is a typed superset of JavaScript that compiles to plain JS — it catches type errors at compile time rather than runtime, enables intelligent IDE tooling (autocomplete, refactoring, go-to-definition), and has become the industry standard for production JavaScript applications.
Function Types
beginner
8 min
TypeScript functions require parameter type annotations (return types are usually inferred), support optional parameters, default values, rest parameters, and function overloads — function type expressions describe callback signatures for higher-order functions.
Interfaces vs Type Aliases
beginner
8 min
Interfaces define object shapes and can be extended with extends or merged via declaration merging — type aliases can represent any type (unions, tuples, primitives) but can't be merged, and the practical rule is to use interface for objects and type for everything else.
Basic Types
beginner
8 min
TypeScript's type system includes primitives (string, number, boolean), arrays (number[] or Array<number>), tuples for fixed-length arrays, literal types for exact values, and special types — any opts out of checking, unknown is the type-safe alternative, never represents impossible values, and void marks functions that don't return.
Union & Intersection Types
beginner
8 min
Union types (A | B) represent values that can be one of several types and require narrowing to access type-specific properties — intersection types (A & B) combine multiple types into one that has all properties, and discriminated unions with a shared literal field are the most type-safe pattern for handling variants.