A typical view of TypeScript with Angular

A typical view of TypeScript with Angular

History of TypeScript

TypeScript may be a relatively new language. it had been launched for public use in October 2012, because the version 0.8 of the language. it had been a results of two years of developed at Microsoft, with Anders Hejlsberg, the lead architect of c#, also because the creator of Delphi and Turbo Pascal performing on the project too. This lack of IDE support issue was tackled and by 2013, TypeScript support was present in other IDEs, like Eclipse employing a plug-in provided by Palantir Technologies. Several text editors were also released with support for TypeScript, like Sublime, Vim and Emacs. The TypeScript 0.8 was followed by a more moderen version, the TypeScript 0.9 which was released in 2013. The newer edition had a further feature- support for generics. ound the same time, the ASCII text file for TypeScript, which was originally hosted by CodePlex, was shifted to Github. a-typical-view-of-typescript-with-angular  

TypeScript’s main benefits:

  • Class and Module Support
  • Static Type-checking
  • ES6 Feature Support
  • Clear Library API Definition
  • Build-in Support for JavaScript Packaging
  • TypeScript Syntax Similarity to Our Backend Languages (Java, Scala, PHP)
  • Superset of JavaScript
TypeScript is an open source programing language that was developed by Microsoft as a superset of JavaScript. this suggests that each one JavaScript files are valid TypeScript files which TypeScript are often trans-compiled as a JavaScript output.

TYPESCRIPT  VS  JAVASCRIPT

TypeScript was developed in 2012 to deal with a number of the functional challenges of programming with JavaScript, namely that its dynamic type can create frustrating bugs that are time-consuming to repair . Dynamic typing is that the opposite of static typing, which needs all variables (numbers, strings, boolean expressions, etc.) to be identifiable by the compiler. This requirement creates documentation in real-time, meaning error-checking happens as new code is written.

JavaScript is TypeScript. This means that any valid .js(JAVASCRIPT) files you can be renamed to .ts (TYPESCRIPT) and compiled with other TypeScript files.

TypeScript is portable. TypeScript is portable resource across browsers, any devices, and any operating systems. It can run on any environment(Browsers) that JavaScript runs on.

TypeScript introduced the choice to use static typing, which enables programmers to write down code that's cleaner and easier to scale without having to find out an entire new language. As such, TypeScript is suitable for front development projects a bit like JavaScript, but the optional static typing makes it ideal for complex server-side development. However, TypeScript requires longer and a spotlight to detail, so it’s less favorable for smaller projects that might be faster to finish without the additional step of trans-compiling.  

Benefits of TypeScript:

    • Early spotted bugs.
    • Optional static typing.
    • Predictability.
    • Readability.
    • Power of OOP.
    • Cross-platform and cross-browser compatibility.

Additional TypeScript features include:

  • Type annotations and compile-time type checking
  • Type inference
  • Type erasure
  • Interfaces
  • Enumerated type
  • Mixin
  • Generic
  • Namespaces
  • Tuple
  • Await
 

Advantages of Typescript

  • TypeScript gives the benefits of discretionary static composing: TS types are often added to factors, capacities, properties, then forth.
  • TypeScript underpins specifically or static composing. Static composing are often valuable to assist archive capacities, explain utilization, and diminish psychological overhead (interface type clues and getting expected mistakes continuously programming).
  • TypeScript runs in any program or JavaScript. Extraordinary tooling with IntelliSense which provides dynamic clues because the code’s additional.
  • TypeScript helps in code organizing.
  • TypeScript features a namespace idea by characterizing a module.
  • TypeScript’s explanations are often discretionary.
  • TypeScript upholds interfaces.
  • TypeScript’s manager modules provides a standout amongst other IDE engineer insight.
  • TypeScript has better documentation for APIs which is during a state of harmony with a ASCII text file . a couple of organizations report a decrease in bugs once they change to TypeScript. Disadvantages of TypeScript
  •  TypeScript sets aside an extended effort to include the code.

TypeScript for Functional Programmers

TypeScript began its life as an effort to bring traditional object-oriented types to JavaScript in order that the programmers at Microsoft could bring traditional object-oriented programs to the online . because it has developed, TypeScript’s type system has evolved to model code written by native JavaScripters. The resulting system is robust and messy. This introduction is meant for working Haskell or ML programmers who want to find out TypeScript. It describes how the sort system of TypeScript differs from Haskell’s type system. This introduction doesn't cover object-oriented programming. In practice, object-oriented programs in TypeScript are almost like those in other popular languages with OO features.