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

advanced
Advanced Type Patterns
advanced
12 min
Advanced TypeScript covers variance (how subtyping flows through generics), complex generic constraints (multiple bounds, recursive types), branded types for nominal typing, and declaration merging — these patterns appear in library authoring and senior-level interview questions.
Conditional Types
advanced
10 min
Conditional types use the syntax T extends U ? X : Y to branch at the type level — combined with the infer keyword to extract types from patterns and distributive behavior over unions, they power most of TypeScript's built-in utility types.
Declaration Files
advanced
10 min
Declaration files (.d.ts) provide type information for JavaScript code without implementations — they enable TypeScript to type-check against libraries, ambient declarations describe globals like window extensions, and module augmentation extends third-party package types.
Mapped Types
advanced
10 min
Mapped types transform existing types by iterating over their keys with { [K in keyof T]: NewType } — modifiers add/remove readonly and optional, key remapping (as clause) filters or renames keys, and they power built-in utilities like Partial, Required, Readonly, and Record.
Template Literal Types
advanced
10 min
Template literal types use backtick syntax at the type level to construct string types from other types — combined with union distribution they generate combinatorial patterns, and with intrinsic string types (Uppercase, Lowercase, Capitalize) they enable type-safe event handlers, CSS values, and API routes.