
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 31-lesson course built from Chai aur Code's 4h 38m of YouTube video. 3 days at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by Chai aur Code on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Understand the course structure, prerequisites (JavaScript knowledge), and the core problem TypeScript solves: catching type-related bugs early.
Grasp that TypeScript is a superset of JavaScript adding only static type checking, and that it compiles down to plain JavaScript.
Write your first typed function, see immediate editor feedback without any build setup, and learn that modern editors provide TypeScript intelligence out of the box.
Follow the TypeScript compiler stages (Scanner, Parser, Binder, Checker, Emitter) to understand how type checking and declaration files (.d.ts) enable IDE features.
Initialize a project with npm, install TypeScript as a dev dependency, run tsc --init, and explore the generated tsconfig.json compiler flags.
Compile with npx tsc, run the emitted JavaScript with Node, and see how newer runtimes (ts-node, Bun) execute TypeScript directly.
Distinguish between TypeScript inferring types automatically and you explicitly annotating variables, parameters, and return types with colon syntax.
Use the three core primitive type annotations (string, number, boolean) in lowercase and see how they restrict assignments.
Combine types with the pipe operator (|) to create unions, and use exact string/number literals as types for finite value sets like 'pending' | 'success' | 'error'.
Learn how TypeScript narrows union types inside if/else blocks using typeof, instanceof, and equality checks, enabling safe property access.
Model complex states (e.g., API responses, UI variants) with discriminated unions sharing a common literal property (kind/status) for exhaustive checking.
Write reusable type guard functions (e.g., isTeaOrder) using type predicates (obj is TeaOrder) to validate unknown data at runtime and gain static type safety.
Use the never return type on functions that throw or loop forever, and assign narrowed variables to never in exhaustive switch statements to catch missing cases at compile time.
Prefer unknown over any for values from APIs/localStorage; narrow unknown with type guards (typeof, Array.isArray) before using the value.
Force a type with 'as Type' or '<Type>' when you know more than TypeScript (e.g., JSON.parse, document.getElementById), understanding this is a compile-time hint only.
Handle caught errors typed as unknown; narrow them with 'instanceof Error' checks before accessing .message, and understand the 'import type' syntax for declaration-only imports.
Define object shapes with inline types or interfaces; learn that interfaces merge automatically and are preferred for class implements and library contracts.
Type dictionary-like objects with index signatures [key: string]: ValueType, and create immutable arrays with readonly to prevent push/splice mutations.
Define fixed-length, heterogeneous arrays as tuples [string, number], and nest array brackets for matrices (number[][]).
Transform existing types with Partial (all optional), Required (all required), Pick (select keys), and Omit (remove keys) for flexible prop handling.
Type function signatures including optional/default/rest parameters, void returns, and complex object arguments; understand inference vs explicit annotation.
Declare class fields with types, add constructors for initialization, and use public/private/protected modifiers; see how 'this' references the instance.
Write generic functions, interfaces, and classes (e.g., Box, ApiResponse) with type parameters to create reusable, type-safe abstractions.
Explore how .d.ts files provide IntelliSense for JS libraries, how DefinitelyTyped (@types/*) publishes them, and how to write custom declarations for untyped libs.
Install axios, type its response with generics, handle unknown errors in try/catch, and build a typed useFetch hook combining useState/useEffect with discriminated state.
Create a React+TS project with Vite, type component props with interfaces, handle form events (ChangeEvent<HTMLInputElement>), and cast string inputs to numbers.
Review the full journey: primitives, unions, narrowing, guards, generics, interfaces, classes, declaration files, and practical React integration; gain confidence to continue learning independently.
Review the full journey: primitives, unions, narrowing, guards, generics, interfaces, classes, declaration files, and practical React integration; gain confidence to continue learning independently.
Review the full journey: primitives, unions, narrowing, guards, generics, interfaces, classes, declaration files, and practical React integration; gain confidence to continue learning independently.
Review the full journey: primitives, unions, narrowing, guards, generics, interfaces, classes, declaration files, and practical React integration; gain confidence to continue learning independently.
Review the full journey: primitives, unions, narrowing, guards, generics, interfaces, classes, declaration files, and practical React integration; gain confidence to continue learning independently.