Questions

TypeScript questions

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

How to Create a Sleep Delay in TypeScript Without Blocking the UI

Learn how to create non-blocking sleep delays in TypeScript with Promise, async/await, and setTimeout for Angular form redirects.

typescriptangularsleep

How to Create an Object from an Interface in TypeScript

Learn how to use a TypeScript interface to describe an object and correctly create and initialize that object in practice.

typescript

How to Declare Nullable Types in TypeScript Interfaces

Learn how to make properties nullable in TypeScript interfaces using union types, optional fields, and null-safe patterns.

typescriptnullable

How to Define an Array with Multiple Types in TypeScript

Learn how to type arrays with mixed values in TypeScript using union types and tuples, with examples, pitfalls, and practical use cases.

typescriptarrays

How to Determine the Active Route in Angular

Learn how to detect and style the active route in Angular using routerLinkActive, Router, and ActivatedRoute with practical examples.

typescriptjavascriptangularangular2-routing

How to Dynamically Assign Properties to an Object in TypeScript

Learn how to add dynamic properties to objects in TypeScript using index signatures, Record, type assertions, and safe typing patterns.

typescript

How to Enforce String Values in Indexed TypeScript Objects

Learn how to type indexed objects in TypeScript so string keys only map to string values using index signatures and Record.

typescript

How to Exclude a Property from a Type in TypeScript

Learn how to exclude one property from a type in TypeScript using Omit, Pick, and mapped types with clear examples.

typescript

How to Extend Types in TypeScript

Learn how to extend types in TypeScript using intersections and interfaces, with examples, mistakes, and real project patterns.

typescriptjavascript

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.

typescriptangularangular-ngmodelangular-forms

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.

typescriptreactjsjsxtsx

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.

typescriptangularproperties

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.

typescriptnode.jsnpm

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.

typescripteslinttypescript-eslint

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.

typescriptangular

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.

typescripteslint

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.

typescript

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.

typescripttsconfig.json

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.

typescriptenums

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.

typescriptangularhtml-select

Page 4 of 9 - 162 questions