Typescript > Introduction

Typescript > Introduction


As written earlier "TypeScript is a typed superset of JavaScript that compiles to plain JavaScript", in plain words we can say that "TypeScript is another programming language to write better JavaScript code".

The applications of JavaScript like maps, document editing, web E-mail, collaboration tools, etc.…. are vastly increased in the everyday computing life. To meet the daily needs of the JavaScript programmers/programming teams Typescript is designed, it helps programmers/programming teams to define interfaces between software components and also to gain insight into the behavior of existing JavaScript files.

Relation between Typescript & JavaScript

  • Every JavaScript program is also a Typescript.

  • Typescript is a syntactic sugar for a JavaScript.

  • JavaScript output closely matches the Typescript input; this is because of Typescript compiler performs only file-local transformations on programs of Typescript without re-ordering the declared variables.

  • Typescript syntax is a superset of ECMAScript (ES5) syntax and also consists of several proposed features of ECMAScript (ES6) which includes Classes and Modules.

  • For JavaScript programmers Typescript provides a system of optional type annotations. In JavaScript the annotations are like the JSDoc comments found in the closure system.

Classes

Classes enable programmers/programming teams to make features like inheritance more interoperable & readable and also to express common object-oriented patterns in a standard way.

Modules

Modules enable programmers/programming teams to organize their own code into components while avoiding naming conflicts. 

Read posts under Typescript > Introduction

2 posts found
  1. Installing TypeScript
  2. Compiling TypeScript code



Write for us






Hosting Recommendations