Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 1.59 KB

File metadata and controls

26 lines (17 loc) · 1.59 KB

What is TypeScript?

TypeScript is a syntactic superset of JavaScript which adds static typing.

This basically means that TypeScript adds syntax on top of JavaScript, allowing developers to add types.

Why should I use TypeScript?

JavaScript is a loosely typed language. It can be difficult to understand what types of data are being passed around in JavaScript.

In JavaScript, function parameters and variables don't have any information! So developers need to look at documentation, or guess based on the implementation.

How do I use TypeScript?

A common way to use TypeScript is to use the official TypeScript compiler, which transpiles TypeScript code into JavaScript.

difference between js and ts

javascript typescript
JavaScript is a prototype-based language. TypeScript is known as an Object-oriented programming language
weakly typed strongly typed
used for small projects used to big projects
mostly Runtime error mostly compile time error
Runs directly to browser it's need a transpiler to convert to js
easy to write but hard to maintain hard to write but easy to mmaintain