TypeScript is a programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language. Current Stable release: 4.2.3 / 5 March 2021. It has extensions: ts,.tsx.
TypeScript used to develop JavaScript applications for both client-side and server-side execution. Typescipt describe the shape of an object, also validate that your code is working correctly. All valid JavaScript code is also TypeScript code.
TypeScript code is transformed into JavaScript code via the TypeScript compiler or Babel. This JavaScript is clean, simple code which runs anywhere JavaScript runs: In a browser, on Node.JS or in your apps.
Typescript support in Visual Studio, Visual Studio Code, Nova, Atom, Sublime Text, Emacs, Vim, WebStorm and Eclipse. Provide wide range of accessibility & usablity.
Typescript is combination of static type checking with intelligent code completion provides a significant boost in developer productivity.
TypeScript vs JavaScript
TS: TS is strongly type object oriented compiled langauge.
JS: Javascript is a light weight, interpreted programming language.
TS: Anders Heijsberg at Microsoft
JS: J Brendan Eich at Netscape Communications Coropration, Mozilla Foundation, ECMA International
TS: Heavy Weighted interpreted programming language
JS - Light weighted, design for development of large application and trans compile to JS
TS: Specially used in Client Side
JS: Both client side & server side
TS: .ts, .tsx
JS: .js, .jsx
TS: Modules, Functions, Variable, Statement & Expression, Comments
JS: All Statement are written within Script tag, tell browser to start interpreting text between script tag
TS: Static Typing, Better Choice Of large Coding Projects, Better For Collaboration - Type Safetly, Warning, Options, Required, Better Productivity, ECMA 6 code, Dynamic Typing, Auto Compilation are help developers to boost their productivity
JS: Huge active community, Supported Native Browsers, While for TS will first complied and convert to js, which is extra step, More flexibility
Want to start with Typescript, Lets start!
Get tech aricles directly in your inbox! Share your email with us and receive tech articles as instant as we publish!
* Content referenced from Airtel Offical Website!
Thanks for reading Blog!
DIGITAL TRANSFORMATION