Questions
TypeScript questions
Choose a question page, learn the concept, then test your understanding with a quiz.
How to Extend Types in TypeScript
Learn how to extend types in TypeScript using intersections and interfaces, with examples, mistakes, and real project patterns.
How to Fix "Can't bind to 'ngModel'" in Angular
Learn why Angular shows "Can't bind to 'ngModel'" and how to fix it by importing FormsModule correctly in Angular modules.
How to Fix "Cannot use JSX unless the '--jsx' flag is provided" in TypeScript React
Learn why TypeScript shows the JSX flag error in TSX files and how to fix tsconfig, file inclusion, and project setup correctly.
How to Fix "Property 'value' does not exist on type 'EventTarget'" in TypeScript and Angular
Learn why EventTarget has no value property in TypeScript and how to safely access input values in Angular event handlers.
How to Fix "Unknown file extension .ts" in TypeScript on Heroku
Learn why Heroku shows "Unknown file extension .ts" and how to fix ts-node, ESM, CommonJS, and TypeScript runtime setup.
How to Fix "parserOptions.project" Errors in ESLint with TypeScript
Learn why ESLint shows "parserOptions.project" errors in TypeScript projects and how to fix config files like babel.config.js correctly.
How to Fix 'No Provider for HttpClient' in Angular
Learn why Angular shows 'No provider for HttpClient' and how to fix module imports, dependency injection, and casing issues correctly.
How to Fix ESLint import/no-unresolved with TypeScript Imports
Learn why ESLint cannot resolve TypeScript imports and how to configure eslint-import-resolver-typescript correctly.
How to Fix TS7006: Parameter Implicitly Has an 'any' Type in TypeScript
Learn why TS7006 happens in TypeScript and how to fix implicit any errors using proper types, interfaces, and typed arrays.
How to Generate a tsconfig.json File in TypeScript
Learn how to create a tsconfig.json file from the command line in TypeScript, what it does, and how to use it in real projects.
How to Get Enum Entry Names in TypeScript
Learn how to get enum entry names in TypeScript, iterate enums safely, and avoid reverse-mapping pitfalls with clear examples.
How to Get the Selected Value from a Select in Angular 2
Learn how to read the new selected option from a select element in Angular 2 using ngModel, change events, and ngModelChange.
How to Handle Optional Parameters in TypeScript When Skipping Earlier Arguments
Learn how optional parameters work in TypeScript and how to pass later values when skipping earlier optional arguments.
How to Handle TS2533: Object Is Possibly 'null' or 'undefined' in TypeScript
Learn why TypeScript shows TS2533 for possibly null or undefined values and how to fix it safely with checks, assertions, and better types.
How to Ignore TypeScript Errors: @ts-ignore, File-Level Alternatives, and Safer Patterns
Learn how @ts-ignore works in TypeScript, why it only affects one line, and the safe alternatives for larger code blocks or files.
How to Import JSON in TypeScript and Use Typed Properties
Learn how to import JSON files in TypeScript, why property errors happen, and how to fix JSON imports in TS and TSX files correctly.
How to Import SVG Files in TypeScript and TSX
Learn why TypeScript cannot import SVG files by default and how to fix it in TSX with module declarations and practical examples.
How to Iterate Over Object Keys and Values with *ngFor in Angular
Learn how to loop through object keys and values in Angular using *ngFor and the keyvalue pipe, with examples and common mistakes.
How to Loop Through Enum Values in TypeScript
Learn how TypeScript enums work and how to loop through enum values without getting reverse-mapped numeric keys.
How to Pass Data to Angular Routed Components
Learn practical ways to pass data to Angular routed components using route params, query params, navigation state, and shared services.