Most viewed questions in TypeSript

0 votes
1 answer

How to get TypeScript definition files via bower?

The best option is to use tsd. It ...READ MORE

Jun 10, 2022 in TypeSript by Nina
• 3,060 points
747 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 742 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
737 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
734 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
726 views
0 votes
1 answer

Measuring web performance metrices in TypeScript front end program

The performance metrics are provided by the ...READ MORE

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

Conversion from both keys and values of object

You could just change the declaration of ...READ MORE

May 31, 2022 in TypeSript by Nina
• 3,060 points
712 views
0 votes
0 answers

TypeScript: for-in statement

TypeScript docs say nothing about loop like ...READ MORE

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

What does <T> do in TypeSript?

This is a TS Generics declaration. T will be declared ...READ MORE

May 31, 2022 in TypeSript by Nina
• 3,060 points
658 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
647 views
0 votes
1 answer

How to typecast a string to number in TypeScript?

You can use the parseInt or parseFloat functions, or simply use ...READ MORE

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

how to use spread syntax and new Set() with TypeScript

The ... operator should work on anything ...READ MORE

Jun 10, 2022 in TypeSript by Nina
• 3,060 points
614 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
612 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
610 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
586 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
585 views
0 votes
1 answer

Difference between interfaces and classes in Typescript

Interfaces Describe how an object should look Exists compile ...READ MORE

Jun 15, 2022 in TypeSript by Nina
• 3,060 points
540 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
531 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, 2022 in TypeSript by Logan
• 2,140 points
510 views
0 votes
1 answer

Naming of TypeScript's union and intersection types

The type A | B refers to objects which ...READ MORE

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

Is it necessary to learn TypeScript first before going to explore Angular2?

It's not necessary to learn TypeScript but ...READ MORE

Jun 10, 2022 in TypeSript by Nina
• 3,060 points
455 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
362 views
0 votes
0 answers

What is argument of type 'never[ ]' is not assignable to parameter of type 'string' in TypeScript

This is my code : export default class ...READ MORE

Apr 18, 2023 in TypeSript by anonymous

edited Mar 5 168 views
0 votes
0 answers

npm installing old versions of (typescript compiler) package

On a windows environment, I have: node ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 144 views
0 votes
0 answers

How to cast a json in typescript?

How to remove properties automatictly? READ MORE

Nov 10, 2022 in TypeSript by Alexandre

edited Mar 4 130 views
0 votes
0 answers

Optional property class in typescript

I'm new in typescript and I want ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 121 views
0 votes
0 answers

typescript - create type that denotes the set of even numbers

Can anyone know how to create this ...READ MORE

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 111 views
0 votes
0 answers

Ignore typescript definition error

I have a 3rd party typescript definition ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 47 views
0 votes
0 answers

Typescript & operator

I'm struggling to find the definition of ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 46 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

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited Mar 4 45 views
0 votes
0 answers

Typescript compiler can't find node with yarn - Cannot find type definition file for 'node'

I have @types/node installed. I'm using Yarn ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 45 views
0 votes
0 answers

How to install and run Typescript locally in npm?

I want to install and run Typescript ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 44 views
0 votes
0 answers

Property 'value' does not exist on type EventTarget in TypeScript

So the following code is in Angular ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 44 views
0 votes
0 answers

What is the difference between var and let in Typescript?

I submitted a question on stack overflow ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 43 views
0 votes
0 answers

Typescript how to create type with common properties of two types?

There are 2 types type A = { ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 43 views
0 votes
0 answers

typescript interface require one of two properties to exist

I'm trying to create an interface that ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 43 views
0 votes
0 answers

Define prototype function with typescript

When I try to define a prototype ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 42 views
0 votes
0 answers

TypeScript A computed property name in a type literal must directly refer to a built-in symbol

I'm looking forward an object which contains ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 42 views
0 votes
0 answers

Difference between Javascript object and Typescript object

I am trying to figure out if ...READ MORE

Aug 1, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 42 views
0 votes
0 answers

When to use Interface and Model in TypeScript / Angular

I recently watched a Tutorial on Angular ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 41 views
0 votes
0 answers

Declare an array in TypeScript

I'm having trouble either declaring or using ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 41 views
0 votes
0 answers

Enforcing the type of the indexed members of a Typescript object?

I would like to store a mapping ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 40 views
0 votes
0 answers

Cartesian product of multiple arrays in JavaScript

How can I find the cartesian product ...READ MORE

Jul 28, 2022 in TypeSript by krishna
• 2,820 points

edited Mar 4 30 views
0 votes
0 answers

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

Could you please describe the TypeScript language? What ...READ MORE

Aug 1, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 27 views
0 votes
0 answers

How can I define the type for a <video> reference in React using Typescript?

I'm trying to control the play/pause state ...READ MORE

Aug 3, 2022 in TypeSript by Elton
• 400 points

edited Mar 4 25 views
0 votes
0 answers

Make vuex store globally available with Vue 3 and typescript (project built with the cli) +solved

How do I make my store globally ...READ MORE

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

edited Mar 4 24 views
0 votes
0 answers

Getting the height and width of an image in Angular using TypeScript

I'm trying to get the width and ...READ MORE

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

edited Mar 4 24 views
0 votes
0 answers

How to add Typescript definitions to Express req & res?

I have a set of controller functions ...READ MORE

Aug 3, 2022 in TypeSript by Deepak
• 980 points

edited Mar 4 23 views