TypeScript Flashcards

1
Q

What is TypeScript

A

Superset of JS/ does everything JS does but has some added features
All about TypeSafety

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Advantages of using TS?

A

Static typing meaning type of variable cannot be changed or reassigned
This is to prevent a lot of bugs
If declared a string cannot be changed to integer
Less bugs
More precise, readable code
Shows errors as you write
Less error in runtime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disadvantage of TS?

A

Cannot be read by browser requires a compiler to compile into JS
Compiler is TSC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Primitive vs reference types

A

Primitive take up a unique location in memory
Reference type refer to a memory location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly