Most viewed questions in TypeSript

0 votes
1 answer

What's the difference between class and interface in TypeScript? When do you use them?

A class is a blueprint of how ...READ MORE

May 31, 2022 in TypeSript by Nina
• 3,060 points
387 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
385 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
362 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
339 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
337 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
330 views
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
326 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
323 views
0 votes
1 answer

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

TypeScript is a superset of JavaScript which primarily ...READ MORE

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

Now I know what 'pick' does. But I want to do the opposite and remove values from an object.

You can use the keyword Omit for ...READ MORE

May 27, 2022 in TypeSript by Nina
• 3,060 points
305 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
285 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
282 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
275 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
274 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
264 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
263 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
261 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
253 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
235 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
226 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
210 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
198 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
181 views