Latest 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,977 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,760 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,565 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,532 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,259 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
241 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,804 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
603 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,104 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,406 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
884 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,059 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
902 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
600 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
420 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,392 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,282 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
207 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
755 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
502 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
278 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
816 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,226 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
587 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
279 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
298 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,033 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
265 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
343 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
469 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,052 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
742 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
844 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,313 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,024 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
1,003 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
328 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 538 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
353 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
705 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
183 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
6,053 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,468 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
534 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
473 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
438 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,224 views