Most voted questions in TypeSript

0 votes
0 answers

What is argument of type 'never[ ]' is not assignable to parameter of type 'string' in TypeScript

This is my code : export default class ...READ MORE

Apr 18, 2023 in TypeSript by anonymous

edited Mar 5 335 views
0 votes
0 answers

How to cast a json in typescript?

How to remove properties automatictly? READ MORE

Nov 10, 2022 in TypeSript by Alexandre

edited Mar 4 241 views
0 votes
0 answers

Javascript Arrays Opposite of Includes

What is the proper approach to remove ...READ MORE

Aug 8, 2022 in TypeSript by krishna
• 2,820 points
4,112 views
0 votes
0 answers

Optional property class in typescript

I'm new in typescript and I want ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 223 views
0 votes
0 answers

npm installing old versions of (typescript compiler) package

On a windows environment, I have: node ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 253 views
0 votes
0 answers

typescript - create type that denotes the set of even numbers

Can anyone know how to create this ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 207 views
0 votes
0 answers

React Typescript: It looks like you're trying to use TypeScript but do not have typescript installed

I want to create a React application ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 158 views
0 votes
0 answers

How to add Typescript definitions to Express req & res?

I have a set of controller functions ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 171 views
0 votes
0 answers

When to use Interface and Model in TypeScript / Angular

I recently watched a Tutorial on Angular ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 155 views
0 votes
0 answers

why we are using HTMLInputElement in typescript?

Why we are using: (document.getElementById("ipv") as HTMLInputElem ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 133 views
0 votes
0 answers

How to install and run Typescript locally in npm?

I want to install and run Typescript ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 156 views
0 votes
0 answers

What is the difference between var and let in Typescript?

I submitted a question on stack overflow ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 157 views
0 votes
0 answers

How to install all typescript definition file based on packages.json?

In my project, I have a package.json ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 140 views
0 votes
0 answers

Typescript how to create type with common properties of two types?

There are 2 types type A = { ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 122 views
0 votes
0 answers

Typescript & operator

I'm struggling to find the definition of ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 137 views
0 votes
0 answers

Define prototype function with typescript

When I try to define a prototype ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 145 views
0 votes
0 answers

Enforcing the type of the indexed members of a Typescript object?

I would like to store a mapping ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 146 views
0 votes
0 answers

Declare an array in TypeScript

I'm having trouble either declaring or using ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 149 views
0 votes
0 answers

Use typescript to dynamically set class property in constructor

I am trying create a typescript class MyClass with ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 146 views
0 votes
0 answers

Ignore typescript definition error

I have a 3rd party typescript definition ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 166 views
0 votes
0 answers

Overriding interface property type defined in Typescript d.ts file

Is there a way to change the ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 130 views
0 votes
0 answers

Source has 2 element(s) but target allows only 1. Typescript spread operator

I'm trying to spread all values in ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 161 views
0 votes
0 answers

TypeScript A computed property name in a type literal must directly refer to a built-in symbol

I'm looking forward an object which contains ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 166 views
0 votes
0 answers

typescript interface require one of two properties to exist

I'm trying to create an interface that ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 171 views
0 votes
0 answers

Set types on useState React Hook with TypeScript

I'm migrating a React with TypeScript project ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 131 views
0 votes
0 answers

How can I define the type for a <video> reference in React using Typescript?

I'm trying to control the play/pause state ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 154 views
0 votes
0 answers

Property 'value' does not exist on type EventTarget in TypeScript

So the following code is in Angular ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 182 views
0 votes
0 answers

Typescript compiler can't find node with yarn - Cannot find type definition file for 'node'

I have @types/node installed. I'm using Yarn ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 152 views
0 votes
1 answer

How to define string literal union type from constants in Typescript

You can also use enum for this ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
2,669 views
0 votes
1 answer

How to use useState hook in React with typescript correctly?

You can set a string type for it Explicit way: const ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
5,646 views
0 votes
1 answer

Why is Event.target not Element in Typescript?

JLRishe's answer is correct, so I simply ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
4,911 views
0 votes
1 answer

Experimental decorators warning in TypeScript compilation

Although VS Code is an excellent editor ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,908 views
0 votes
0 answers

Experimental decorators warning in TypeScript compilation

I receive the warning... Experimental support for decorators ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 127 views
0 votes
0 answers

What is the way of declaring an array in JavaScript?

These are some of the way to ...READ MORE

Aug 3, 2022 in TypeSript by krishna
• 2,820 points
577 views
0 votes
1 answer

Error in the angular compiler requires typescript >=3.4.0 and <3.6.0 but 3.9.10 was found instead

Run this script to find exact version npm ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
6,006 views
0 votes
1 answer

Is TypeScript really a superset of JavaScript?

The purpose of TypeScript is to have ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,341 views
0 votes
1 answer

Is there any official Typescript definition for fabric.js?

Typically, packages in Definitely Typed aren't official ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,933 views
0 votes
1 answer

Using TypeScript, and Object.assign gives me an error "property 'assign' does not exist on type 'ObjectConstructor'"

You can use type assertion, like this: (<any>Object).as ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
5,505 views
0 votes
1 answer

Using spread syntax and new Set() with typescript

This seems to be a typescript ES6 ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,769 views
0 votes
0 answers

Importing Chai in Typescript

I'm trying to use chai in typescript. Chai's ...READ MORE

Aug 1, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 141 views
0 votes
0 answers

Difference between Javascript object and Typescript object

I am trying to figure out if ...READ MORE

Aug 1, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 149 views
0 votes
0 answers

What is TypeScript and why would I use it in place of JavaScript?

Could you please describe the TypeScript language? What ...READ MORE

Aug 1, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 129 views
0 votes
1 answer

What is the question mark for in a Typescript parameter name?

It is to mark the parameter as optional. TypeScript ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,805 views
0 votes
0 answers

Angular & eslint - Definition for rule '@typescript-eslint/space-infix-ops' was not found

I recently removed the tslint from my ...READ MORE

Aug 1, 2022 in TypeSript by Elton
• 400 points
1,468 views
0 votes
1 answer

What does the @ (at sign) mean in the latest TypeScript (presumably v1.5) example?

The big news this week is the ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,494 views
0 votes
1 answer

Get typescript definition files via bower?

It is possible with bower. First install bower ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,261 views
0 votes
1 answer

Typescript: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`

The same as a couple of days ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
6,086 views
0 votes
0 answers

Embed TypeScript code in an HTML document

Can TypeScript code be inserted into a ...READ MORE

Jul 29, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 136 views
0 votes
0 answers

vertical bar and null used for in TypeScript

Hello, I'm new to TypeScript and JavaScript. What ...READ MORE

Jul 29, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 130 views