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,901 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,715 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,476 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,413 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,233 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
225 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,678 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
580 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,052 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,288 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
847 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,001 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
878 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
576 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
353 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,253 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,261 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
195 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
731 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
493 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
271 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
797 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,181 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
574 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
264 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
270 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
995 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
241 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
315 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
456 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,025 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
729 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
827 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,265 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,006 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
975 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
304 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 528 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
314 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
675 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
177 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,915 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,414 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
461 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
430 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,206 views