Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Type script


Published on

Type script Introduction

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Type script

  1. 1. TypeScript
  2. 2.  TypeScript is about addressing this problem  A problem that we hear increasingly more and more from customers and internal users that writing really large apps in JavaScript is hard.  And JavaScript was really never intended for writing large apps  JavaScript has no concept for structuring large code bases. No classes, not yet at least, no modules, no interfaces, and there's no static typing at all.  It's a purely dynamically typed language.
  3. 3.  The intelligent IDEs that we as programmers rely on every day , at the core of most of it is static typing, or the ability to reason about the code in intelligent ways  so the IDE can deliver invaluable things like statement completion, go to definition, find all references, refactorings that are known to be safe.  That just gets a super, super hard in big dynamic code bases.
  4. 4.  And that really, in a nutshell, is whatTypeScript is.  It's a language for large scale JavaScript app development.
  5. 5.  In a more technical sense, it is a statically typed super set of JavaScript that compiles to plain JavaScript.  SoTypeScript itself is written inTypeScript and therefore compiles to plain JavaScript.
  6. 6.  Basically, it starts with JavaScript.  So it's important to understand thatTypeScript is not a new language or different language.  It is at the core of it JavaScript.  But it's JavaScript with type annotations and the ability to declare types.
  7. 7.  So what it adds is types, including generics and all sorts of other fun stuff.
  8. 8.  And then, powered by that is excellent tooling, tooling that does things that you just couldn't do with purely a dynamic programming language.
  9. 9.  But when you compile, it all goes away, and you're just left with JavaScript.  In fact, you're left with what I would argue is idiomatic JavaScript that looks like a human wrote it.  The code that you get is the code that you wrote, minus the types.
  10. 10. reference  