Section 1

Preview this deck

How could you install TypeScript on a machine?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

3

All-time users

4

Favorites

0

Last updated

4 years ago

Date created

Mar 14, 2020

Cards (10)

Section 1

(10 cards)

How could you install TypeScript on a machine?

Front

Two main ways - Via npm - By installing TypeScript's Visual Studio plugins

Back

What is the syntax used for declaring the type of a variable?

Front

variableName:type

Back

What is the purpose of the 'tsconfig.json' file?

Front

it allows you to specify the root level files and the compiler options that requires to compile a TS file

Back

How are TypeScript and JavaScript related to one another?

Front

- TS adopts the basic building blocks of your program from JS - All TS code is converted into its JS equivalent for the purpose of execution - Any valid .js file can be renamed to .ts and compiled with other TS files

Back

What is TypeScript?

Front

- TypeScript is JS for application-scale development - It is a strongly typed, object-oriented, compiled language - it is a typed superset of JS compiled to JS - In other words, TS is JS plus some additional features

Back

What is the syntax used for casting a value into another type?

Front

Use 'as' to cast a value into another type

Back

By default, what version of JS does TS transpile into? How can you change this?

Front

- ES3 - tsconfig.json specify the version you'd like it to transpile to

Back

What are some features in TS that are not present in JS?

Front

- TS has a feature known as Static typing - TS gives support for modules - TS has interface - TS supports optional parameter function

Back

What is the syntax used for declaring the return type of a function?

Front

Use a fat arrow (=>) between the parameters and the return type

Back

Who made TypeScript?

Front

Microsoft

Back