Trending questions in TypeSript

0 votes
1 answer

Typescript: Property "XXX" does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes

Double check the newly added object types. ...READ MORE

Jun 8 in TypeSript by Nina
• 3,020 points
6,294 views
0 votes
1 answer

TypeScript error: "'Foo' only refers to a type, but is being used as a value here."?

To do type checking at runtime with ...READ MORE

Jun 8 in TypeSript by Nina
• 3,020 points
4,646 views
0 votes
1 answer
0 votes
1 answer

What is "not assignable to parameter of type never" error in TypeScript?

All you have to do is define ...READ MORE

May 31 in TypeSript by Nina
• 3,020 points
3,503 views
0 votes
0 answers

Javascript Arrays Opposite of Includes

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

Aug 8 in TypeSript by krishna
• 2,640 points
175 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 in TypeSript by Abhinaya
• 1,160 points
110 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 in TypeSript by Abhinaya
• 1,160 points
100 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 in TypeSript by Abhinaya
• 1,160 points
81 views
0 votes
1 answer

Experimental decorators warning in TypeScript compilation

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

Aug 3 in TypeSript by Abhinaya
• 1,160 points
73 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 in TypeSript by Abhinaya
• 1,160 points
84 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 in TypeSript by Abhinaya
• 1,160 points
63 views
0 votes
1 answer

Is TypeScript really a superset of JavaScript?

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

Aug 3 in TypeSript by Abhinaya
• 1,160 points
52 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 in TypeSript by Abhinaya
• 1,160 points
74 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 in TypeSript by Abhinaya
• 1,160 points
35 views
0 votes
1 answer

Using spread syntax and new Set() with typescript

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

Aug 3 in TypeSript by Abhinaya
• 1,160 points
26 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 in TypeSript by Abhinaya
• 1,160 points
46 views
0 votes
1 answer

Get typescript definition files via bower?

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

Aug 3 in TypeSript by Abhinaya
• 1,160 points
25 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 in TypeSript by krishna
• 2,640 points
20 views
0 votes
1 answer

TypeScript error TS2304: cannot find name ' require'

Here's a really easy work around: declare var ...READ MORE

May 31 in TypeSript by Nina
• 3,020 points
2,721 views
0 votes
1 answer
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 in TypeSript by Elton
• 400 points
69 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 in TypeSript by Logan
• 2,140 points
159 views
0 votes
1 answer

TypeScript - ',' expected.ts(1005)

You can't put statements in JSX curly braces, only expressions. You ...READ MORE

Jun 9 in TypeSript by Nina
• 3,020 points
1,752 views
0 votes
0 answers

TypeScript types to restrict array values

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

Jul 18 in TypeSript by Logan
• 2,140 points
45 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 in TypeSript by Logan
• 2,140 points
35 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 in TypeSript by Logan
• 2,140 points
33 views
0 votes
0 answers

User-Defined Extended Enums in TypeScript

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

Jul 18 in TypeSript by Logan
• 2,140 points
24 views
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 in TypeSript by Logan
• 2,140 points
18 views
0 votes
0 answers

TypeScript type cast & D3.js errors

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

Jul 18 in TypeSript by Logan
• 2,140 points
15 views
0 votes
1 answer

Typescript: TS7006: Parameter 'xxx' implicitly has an 'any' type

You are using the --noImplicitAny and TypeScript doesn't know ...READ MORE

Jun 10 in TypeSript by Nina
• 3,020 points
1,595 views
0 votes
1 answer

Error TS1005: ';' expected. TypeScript for First Build error rxjs inside node_modules

 I investigated that rxjs released a new version: 6.4.0. And ...READ MORE

Jun 10 in TypeSript by Nina
• 3,020 points
1,622 views
0 votes
0 answers
0 votes
0 answers

How can I include pug templates in compiled typescript?

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

Jul 13 in TypeSript by Logan
• 2,140 points
124 views
0 votes
1 answer

TypeScript TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'

If you want a key/value data structure ...READ MORE

Jun 7 in TypeSript by Nina
• 3,020 points
1,715 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 in TypeSript by Logan
• 2,140 points
69 views
0 votes
0 answers

Jest + Typescript cannot mock AWS transcribe function

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

Jul 14 in TypeSript by Logan
• 2,140 points
45 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 in TypeSript by Logan
• 2,140 points
34 views
0 votes
0 answers

Alternative to decorate function in TypeScript

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

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

Applying pdf watermark at typescript side

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

Jul 14 in TypeSript by Logan
• 2,140 points
19 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 in TypeSript by Logan
• 2,140 points
39 views
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 in TypeSript by Logan
• 2,140 points
38 views
0 votes
0 answers

TypeScript -- new Image() from global scope

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

Jul 13 in TypeSript by Logan
• 2,140 points
38 views
0 votes
1 answer

Redux + TypeScript -> Error: A case reducer on a non-draftable value must not return undefined redux

The actual problem is with this line: state ...READ MORE

Jun 16 in TypeSript by Nina
• 3,020 points
975 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 in TypeSript by Logan
• 2,140 points
164 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 in TypeSript by Nina
• 3,020 points
137 views
0 votes
1 answer

Typescript: Can't find names - Error: cannot find name

A known issue: https://github.com/angular/angular/issues/4902 Core reason: the .d.ts file implicitly included ...READ MORE

Jun 7 in TypeSript by Nina
• 3,020 points
1,365 views
0 votes
1 answer

TypeScript ES6: import module "File is not a module error"

We need the export, as a part of ...READ MORE

Jun 7 in TypeSript by Nina
• 3,020 points
1,345 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 in TypeSript by Nina
• 3,020 points
72 views