Most voted questions in TypeSript

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
1,925 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
1,723 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
3,495 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
3,447 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,238 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
231 views
0 votes
1 answer

The Angular Compiler requires TypeScript >=3.4.0 and <3.5.0 but 3.5.3 was found instead

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

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
3,713 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
586 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,064 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
3,315 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
849 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,018 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
880 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
582 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
376 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
3,283 views
0 votes
0 answers

Typescript open-api cilent generation and usage of `fetch`

I am trying to generate a typescript ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
1,266 views
0 votes
0 answers
0 votes
0 answers

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

Can you please describe what the TypeScript ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
197 views
0 votes
0 answers

TypeScript types to restrict array values

Can I use TypeScript types to restrict ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
741 views
0 votes
0 answers

User-Defined Extended Enums in TypeScript

I am writing a TypeScript library that ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
494 views
0 votes
0 answers

TypeScript: Typing the result of an external module's non-mutating extension function

Let's say I'm using external package "foo". ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
274 views
0 votes
0 answers

Typescript: Changing the definition of some third party types d.ts

I am a little bit lost how ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
804 views
0 votes
0 answers

TypeScript type cast & D3.js errors

Now, how should I solve this/typecast this? import ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
1,194 views
0 votes
0 answers

Typescript: Clicking 'X' doesn't successfully close my popup banner

I've created a popup banner with the ...READ MORE

Jul 14, 2022 in TypeSript by Logan
• 2,140 points
579 views
0 votes
0 answers

How to watch typescript files in the background continuously without blocking the terminal?

Is there a way to run tsc ...READ MORE

Jul 14, 2022 in TypeSript by Logan
• 2,140 points
268 views
0 votes
0 answers

Applying pdf watermark at typescript side

I am trying to add a watermark ...READ MORE

Jul 14, 2022 in TypeSript by Logan
• 2,140 points
273 views
0 votes
0 answers

Jest + Typescript cannot mock AWS transcribe function

I've been trying to figure out how ...READ MORE

Jul 14, 2022 in TypeSript by Logan
• 2,140 points
1,011 views
0 votes
0 answers

Alternative to decorate function in TypeScript

Since TypeScript allows decorate only class, method, ...READ MORE

Jul 14, 2022 in TypeSript by Logan
• 2,140 points
247 views
0 votes
0 answers

In typescript, why do the | and & operators flip their meaning when used on function types?

In this code, example1 and example2 are confusing me: type F1 = ...READ MORE

Jul 13, 2022 in TypeSript by Logan
• 2,140 points
324 views
0 votes
0 answers
0 votes
0 answers

How can I create a navigational compass using Typescript and HTML?

I'm looking to display a compass heading ...READ MORE

Jul 13, 2022 in TypeSript by Logan
• 2,140 points
462 views
0 votes
0 answers

How can I include pug templates in compiled typescript?

My nodejs based application uses Pug for ...READ MORE

Jul 13, 2022 in TypeSript by Logan
• 2,140 points
1,037 views
0 votes
0 answers

TypeScript -- new Image() from global scope

I have a class MYMODULE.Image{}, but I ...READ MORE

Jul 13, 2022 in TypeSript by Logan
• 2,140 points
732 views
0 votes
0 answers

How to get webriver io typescript working wdio wizard?

I'm Putting together a WebdriverIO project with ...READ MORE

Jul 5, 2022 in TypeSript by Nina
• 3,060 points
829 views
0 votes
0 answers

Typescript error (2345) when pushing element to array of elements(React js)?

I'm pretty new to Typescript and I ...READ MORE

Jul 5, 2022 in TypeSript by Nina
• 3,060 points
1,279 views
0 votes
0 answers

Stepper Material : using stepper.reset() inside TypeScript

Is it possible to use stepper.reset() inside ...READ MORE

Jul 5, 2022 in TypeSript by Nina
• 3,060 points
1,015 views
0 votes
0 answers

Error when calling theme Props in component using ReactJs and Typescript

I need to pass the color of ...READ MORE

Jul 5, 2022 in TypeSript by Nina
• 3,060 points
978 views
0 votes
0 answers

Function definition syntax confuse in Typescript

I figure that out: One post in ...READ MORE

Jul 5, 2022 in TypeSript by Nina
• 3,060 points
308 views
0 votes
0 answers

Typescript hierarchical inheritance

Consider the following: class A { commonString: ...READ MORE

Jul 5, 2022 in TypeSript by Nina
• 3,060 points

edited Dec 6, 2023 by Soumya 530 views
0 votes
0 answers

What should the return type of Promise.race be? (Typescript)

For example in the code below, what ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
323 views
0 votes
0 answers

How to add and declare new property to class using decorator in typescript (angular)

I'm trying to add new property to ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
685 views
0 votes
0 answers

I don't know about return type in typescript

TYPESCRIPT 3.4.3 I want to make function like ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
179 views
0 votes
0 answers

Typescript says: "types '"a"' and '"b"' have no overlap". What does it mean?

const value = Math.random() < 0.5 ? ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
5,960 views
0 votes
0 answers

Using pdfmaker in Typescript

I want to use to pdfmaker in ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
1,427 views
0 votes
0 answers

What is a type in Typescript for the Component class in Angular 2+?

I have a small problem, but big ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
523 views
0 votes
0 answers

Why I can't create Face3 in ThreeJS Typescript project

I am trying to create Mesh by ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
462 views
0 votes
0 answers

Is there any official Typescript definition for fabric.js?

At the moment, I am able to ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
434 views
0 votes
0 answers

ngx-image-cropper imageloaded() not passing any image data to typescript file event method

I'm using ngx-image-cropper to load and crop images. According ...READ MORE

Jul 5, 2022 in TypeSript by Logan
• 2,140 points
1,210 views