Questions

TypeScript questions

Choose a question page, learn the concept, then test your understanding with a quiz.

Understanding TypeScript Record<K, T>: Definition, Usage, and Examples

Learn what Record<K, T> means in TypeScript, how it works, when to use it, and how it compares to object types and mapped types.

typescripttypescript2.0

Understanding `keyof typeof` in TypeScript

Learn what `keyof typeof` means in TypeScript, how it works with enums and objects, and when to use it to create safe key unions.

typescripttypeofunion-typeskeyof

Understanding esModuleInterop and allowSyntheticDefaultImports in TypeScript

Learn what esModuleInterop and allowSyntheticDefaultImports do in TypeScript, how they affect imports, and when to enable them.

typescript

Understanding npm Peer Dependencies in Angular Projects

Learn what npm peer dependency warnings mean, why Angular package versions conflict, and how to fix mismatched dependencies safely.

typescriptjavascriptangularnpm

Understanding the 'React' Refers to a UMD Global Error in TypeScript

Learn why TypeScript shows the 'React refers to a UMD global' error in TSX files and how the new React JSX transform affects imports.

typescriptjavascriptreactjscreate-react-app

Understanding the Experimental Decorators Warning in TypeScript

Learn why TypeScript shows the experimental decorators warning, even with tsconfig settings enabled, and how to troubleshoot it correctly.

typescriptdecoratorvisual-studio-code

What Is TypeScript and Why Use It Instead of JavaScript?

Learn what TypeScript is, how it extends JavaScript, and why developers use it for safer code, better tooling, and easier maintenance.

typescriptjavascript

What `as const` Means in TypeScript and When to Use It

Learn what `as const` does in TypeScript, how it affects literals and readonly tuples, and why it helps with safer code.

typescripttype-assertion

What `declare` Means in TypeScript

Learn the purpose of the `declare` keyword in TypeScript, when to use it, how it differs from normal declarations, and common mistakes.

typescripttypescript2.0

When to Put @types Packages in dependencies vs devDependencies in TypeScript

Learn how to decide whether @types packages belong in dependencies or devDependencies in TypeScript projects and libraries.

typescriptnpmtypescript-typingspackage.json

Why 'value' Does Not Exist on Type 'HTMLElement' in TypeScript

Learn why TypeScript reports 'value' missing on HTMLElement, and how to safely access input values using correct DOM types.

typescript

require() vs import in Node.js: Understanding CommonJS and ES Modules

Learn the difference between require() and import in Node.js, why default export errors happen, and how to fix module imports clearly.

typescriptnode.jsimportrequire

Page 6 of 6 - 112 questions