Most viewed questions in TypeSript

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
524 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
514 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
502 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
498 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
495 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
492 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
483 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
474 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
456 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
452 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
425 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
417 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
415 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
414 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
396 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
375 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
359 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
357 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
356 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
330 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
315 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
292 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
291 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
256 views