Most viewed questions in TypeSript

0 votes
1 answer

How to use moment.js library in angular 2 typescript app?

REFERENCE: https://momentjs.com/docs/#/use-it/typescript/ You can install this by using: npm install ...READ MORE

Jun 1, 2022 in TypeSript by Nina
• 3,060 points
1,331 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,299 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,276 views
0 votes
0 answers
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,247 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,217 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,205 views
0 votes
1 answer

What is "ambient" in TypeScript

Ambient simply means "without implementation". Ambient declarations only exist ...READ MORE

Jun 22, 2022 in TypeSript by Nina
• 3,060 points
1,164 views
0 votes
0 answers
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,079 views
0 votes
1 answer

Angular ForEach in Typescript?

Try this: selectChildren(data, $event) { ...READ MORE

Jun 7, 2022 in TypeSript by Nina
• 3,060 points
1,069 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,042 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,031 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,020 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,018 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
991 views
0 votes
1 answer

How to define props in TypeScript where a parent component injects props in its children?

Typescript doesn't remove this special rule "!text" ...READ MORE

Jun 16, 2022 in TypeSript by Nina
• 3,060 points
972 views
0 votes
1 answer

What does the ! (exclamation mark) do in TypeScript?

The exclamation mark is called the non-null ...READ MORE

Jun 1, 2022 in TypeSript by Nina
• 3,060 points
939 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
885 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
868 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
837 views
0 votes
1 answer

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

I managed to resolve this by forcing ...READ MORE

Jun 16, 2022 in TypeSript by Nina
• 3,060 points
818 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
807 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
748 views
0 votes
0 answers

Karma, Typescript definition file not loading

I am working on setting up development ...READ MORE

Jun 22, 2022 in TypeSript by Logan
• 2,140 points
747 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
737 views
0 votes
1 answer

Typescript: how to define message type for broker consumer

Our main goal - is to make ...READ MORE

Jun 15, 2022 in TypeSript by Nina
• 3,060 points
708 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
696 views
0 votes
0 answers

Create a react app react 18 with typescript

I am trying to create react 18 ...READ MORE

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

Destructure a function parameter in Typescript

You can use the object de-structuring syntax: createUser(parent: ...READ MORE

Jun 9, 2022 in TypeSript by Nina
• 3,060 points
639 views
0 votes
1 answer

How to create enum type in TypeScript?

TypeScript 0.9+ has a specification for enums: enum ...READ MORE

Jun 8, 2022 in TypeSript by Nina
• 3,060 points
637 views
0 votes
1 answer

Chutzpah configuration for running TypeScript tests in both Visual Studio and Visual Studio Team Services build

I'm not sure if this response is ...READ MORE

Jun 16, 2022 in TypeSript by Nina
• 3,060 points
626 views
0 votes
1 answer

Wildcard module declaration not work in TypeScript 2, why?

I managed to resolve this by forcing ...READ MORE

Jun 16, 2022 in TypeSript by Nina
• 3,060 points
614 views
0 votes
1 answer

What does the @ (at sign) sign do in TypeScript?

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

Jun 10, 2022 in TypeSript by Nina
• 3,060 points
613 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

Jun 22, 2022 in TypeSript by Logan
• 2,140 points
592 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
591 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
589 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
582 views
0 votes
1 answer

React Native Performance: Javascript vs Typescript

TypeScript is just compiled to JavaScript. Think ...READ MORE

Jun 13, 2022 in TypeSript by Nina
• 3,060 points
553 views
0 votes
1 answer

How do you run TypeScript files from command line?

You can leave tsc running in watch mode using tsc ...READ MORE

May 31, 2022 in TypeSript by Nina
• 3,060 points
545 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 532 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
528 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
499 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
467 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, 2022 in TypeSript by Logan
• 2,140 points
466 views
0 votes
1 answer

Mixing JavaScript and TypeScript in Node.js

Combine the following TypeScript compiler options --allowJs Explicitly supports ...READ MORE

Jun 15, 2022 in TypeSript by Nina
• 3,060 points
442 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
436 views
0 votes
1 answer

How to create ES6 Map in Typescript

Refer this as an example this.configs = new ...READ MORE

May 31, 2022 in TypeSript by Nina
• 3,060 points
425 views
0 votes
1 answer

Is it possible to extend types in Typescript?

you can intersect types: type TypeA = { ...READ MORE

Jun 7, 2022 in TypeSript by Nina
• 3,060 points
406 views
0 votes
1 answer

How do you typecast in TypeScript?

Casting: return this.createMarkerStyle(<MarkerSymbolInfo> symbolInfo); Or Casting compatible with tsx mode: return ...READ MORE

Jun 1, 2022 in TypeSript by Nina
• 3,060 points
394 views