FrontendPrep
Menu
Topics
Questions
Guides
Challenges
Soon
Topic Directory

TypeScript Questions

Master your TypeScript fundamentals, advanced mechanics, and ace your frontend interview challenges.

TypeScript Stats
10questions loaded
5 Easy3 Medium2 Hard
Show
Sort

Showing 10 of 10 questions

TypeScriptEasy

TypeScript: any vs. unknown

Understand the differences between any and unknown in TypeScript. Learn when to use which, type assertion, type narrowing, and type safety best practices.

TypeScriptTypesType Safety
6 min read
View
TypeScriptMedium

TypeScript: Declaration Files and Declaration Merging

Understand ambient type definitions (.d.ts), declaration merging, namespace/interface merging, and how to perform global module augmentation for third-party libraries.

TypeScriptTypesModules
7 min read
View
TypeScriptEasy

TypeScript: Interface vs. Type Alias

Master TypeScript types. Learn the differences between Interface and Type declarations, when to use which, declaration merging, mapped types, and TS compiler performance.

TypeScriptTypes
5 min read
View
TypeScriptHard

TypeScript: Mapped Types and Template Literal Types

Understand advanced TypeScript Mapped Types and Template Literal Types. Learn how to map, filter, and remap object keys dynamically using conditional and utility expressions.

TypeScriptTypesAdvanced
8 min read
View
TypeScriptEasy

TypeScript: Readonly and Utility Modifiers

Understand how to enforce immutability in TypeScript. Learn about the readonly modifier, Readonly<T> utility type, const assertions, and readonly arrays.

TypeScriptTypesImmutability
6 min read
View
TypeScriptEasy

TypeScript: Type Assertions and Type Casting

Master TypeScript type assertions. Learn about the 'as' keyword, the angle-bracket syntax, double assertions, const assertions, and when they differ from type casting.

TypeScriptTypesType Assertions
6 min read
View
TypeScriptMedium

TypeScript: Type Narrowing and User-Defined Type Guards

Master TypeScript type narrowing. Learn how to use typeof, instanceof, the 'in' operator, and custom type guard functions (parameter value predicates) to write type-safe logic.

TypeScriptType GuardsType Safety
8 min read
View
TypeScriptHard

TypeScript Generics and Built-in Utility Types

Master TypeScript's advanced type systems. Learn how generics, conditional types, and utility types like Omit, Pick, and ReturnType work under the hood.

TypeScriptGenericsUtility Types
6 min read
View
TypeScriptEasy

TypeScript: Union and Intersection Types

Learn how union types (|) and intersection types (&) work in TypeScript. Understand how they combine primitive and object types, and how to narrow union types.

TypeScriptTypesUnion & Intersection
7 min read
View
TypeScriptMedium

TypeScript: Recreating Built-in Utility Types

Learn how to recreate built-in TypeScript utility types like Pick, Omit, Exclude, ReturnType, and Parameters using generic constraints and conditional type inference.

TypeScriptTypesGenerics
7 min read
View