TypeScript Questions
Master your TypeScript fundamentals, advanced mechanics, and ace your frontend interview challenges.
Showing 10 of 10 questions
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.