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.

TypeScript 1.6 - How I learned to Stop Worrying and Love JavaScript


Published on

The Web is all around us - and there's more of it every day. Soon we'll have a web-powered refrigerator and a web-enabled toaster. And where there's web there's JavaScript - with all its great and not so great features. Whether you like it or not, if you are a developer today, you are a JavaScript developer.
So there's a problem, because lots of people don't really like writing JavaScript, so there's a whole host of tools that will help us to avoid that.
TypeScript is a language that is not afraid of JavaScript, it embraces all the good things and adds a lot of its own goodness.
After three years of active development, it's getting to where it set out to be, and is becoming the thing we all need - a tool for high speed, high quality development of web-oriented code.

Published in: Software
  • Be the first to comment

TypeScript 1.6 - How I learned to Stop Worrying and Love JavaScript

  1. 1. Nov 21, 2015Nov 23, 2014 Sofia var title = “TypeScript 1.6”; var subtitle= “How I Learned to Stop Worrying and Love JavaScript”; var info = { author: “Wekoslav Stefanovski”, level: “Beginner”, about: “TypeScript”, type: [“Intro”, “What’s New”] };
  2. 2. Nov 21, 2015 var agenda: IAgenda; interface IAgenda { whatIsJavaScript: string; loveHateJavaScript: { [id:string]: boolean}; isTypeScriptNeeded: boolean; majorFeatures: IFeature[]; canHasES6: boolean; demos: Demo[] }
  3. 3. Nov 21, 2015 JavaScript The good, the bad and the ugly
  4. 4. Nov 21, 2015 • Prototype-based dynamic scripting language • Is it a functional language? • Is it object-oriented? • It can be completely instable and untestable • It can be absurdly undocumented • Still, the universal language of the web • Some people also use it server-side, even for databases What is this JavaScript thing?
  5. 5. Nov 21, 2015 • Implicit globals • Variable hoisting • Truthy and falsy values • Semicolon insertion • Absurd handling of this • Whatever it is that the ‘+’ operator is doing • Typelessness • Prototype inheritance What I hate about JavaScript?
  6. 6. Nov 21, 2015 • Functions as first-class objects • Openness to extension • Malleability (polyfill) • Prototype inheritance • Again, functions as first-class objects What I love about JavaScript?
  7. 7. Nov 21, 2015 TypeScript A Few Good Types
  8. 8. Nov 21, 2015 • JavaScript’s got 99 problems but types ain’t one • Neither are namespaces • Nor explicit references • Custom types that work as you would expect them to • Structural interfaces to keep the malleability • Fixed this references • Fixed unintended globals & hoisting • Somewhat fixed booleans (by formalizing) Where does TypeScript fit in?
  9. 9. Nov 21, 2015 • Incredibly easy to pick up • Incredibly easy to let go • Use as much of it as you need • Wonderful tooling support • Fanatical devotion to backward and forward compatibility • Compatible with most E6 concepts - now Why I love TypeScript?
  10. 10. Nov 21, 2015 • Classes • Interfaces • Generics • Lexical scoping • Enums • Modules • Ambient declarations Major TypeScript features
  11. 11. Nov 21, 2015 • Classes • Arrow functions (lambdas) • Rest parameters • let • const • Desctructuring • for..of • Template strings • Spread operator • Enums ES6 features
  12. 12. Nov 21, 2015 • Classes • Structural and formal interfaces • Generics • Private, protected, and public methods • Formal constructors • Limited method / constructor overloading • Easy ambient declarations Type System
  13. 13. Nov 21, 2015 • JavaScript is not going to go away • The JavaScript ecosystem is getting richer and richer • And the language is quite stagnant • TypeScript gives us the best of both worlds • Even better server-side experience Bottom Line TypeScript brings back the joy of client-side development (at least, it did for me)
  14. 14. Nov 21, 2015 Thanks to our Sponsors: General Sponsor: Gold Sponsors: Swag Sponsors: Media Partners: Silver Sponsors: Technological Partners: Bronze Sponsors: