Your Choice JavaScript News

TypeScript News Saturday, March 10 Typescript, Exactly typescript, Typescript & more…

TypeScript News TLDR / Table of Contents

  • TypeScript — JavaScript with superpowers –
    • TypeScript can — see that little red underline? That’s Typescript giving us a hint something is horribly gone wrong. You probably figured this one out (good job) — toUpperCase() is a type of String…
    • typescript, exactly Typescript, TypeScript world, Typescript shares, Typescript compiler
  • TypeScript at Lyft –
    • How Lyft Chose TypeScript over FlowType
    • TypeScript, TypeScript compiler, TypeScript interfaces, single TypeScript file, type systems
  • Five things about TypeScript
    • TypeScript is a language for application-scale JavaScript development. Get a quick overview with Microsoft Technical Fellow Anders Hejlsberg and John Papa.
    • TypeScript, TypeScript tools, Fellow Anders Hejlsberg, application-scale JavaScript development, robust tooling experience
  • Lets fix it by stating we can only pass the type String as an argument to our nameToUpperCase() method.
  • Now instead of having to remember nameToUpperCase() only accepts a String, we can trust Typescript to remember it.
  • Notice TypeScript gets compiled to Javascript (its just a superset of Javascript, much like C++ toC)Thats the big-big argument why TypeScript and type checking is great.
  • Open your terminal and type the following: – We should end up with the Typescript config.
  • unorganized array vs tuple (organized array)If we dont follow the sorting index rules we issued for our tuple, Typescript will hint us we didnt go by the rules – The tuple expects the first value to be a numberbut its not in this case, its a string Indrek and thus…

Tags: typescript, exactly Typescript, TypeScript world, Typescript shares, Typescript compiler

  • Take for instance the following JavaScript code: – This function makes an HTMLInputElement, and depending on the type, it sets the checkboxes checked attribute to the (supposedly) booleanvalue argument.
  • There are a few type systems available for JavaScript: – Google Closure Compiler with JSDoc type ultimately decided to use TypeScript, but it wasnt an easy decision.
  • Though measuring the popularity of an open source project can be a subjective art, I tried my best to find reasonable metrics as a basis for comparison: – StackOverflow questions: FlowType: ~900; TypeScript~38,000 – GitHub Issues: FlowType: ~1,500 Open, 2,200 Closed; TypeScript: ~2,400 Open, 11,200 Closed – GitHub pull requests…
  • flow type definition – TypeScript: ~3,700 external, ~250k results for typings in package.json in GitHub, Even FB repos like Redux and ImmutableJS provide TS type definitions – We even sent out a survey to our own engineers to investigate internal popularity of each project.
  • JavaScript Linters prevent common pitfalls even without type systems, but are stronger at protecting code with a type system, which is why we use TSLint with all of our TypeScript projects.

Tags: TypeScript, TypeScript compiler, TypeScript interfaces, single TypeScript file, type systems

  • TypeScript is a language for application-scale JavaScript development.
  • Its a typed superset of JavaScript that compiles to plain JavaScript and was originally created out of a need for a more robust tooling experience to complement JavaScript language developers.
  • TypeScript makes it easier for developers to write cross-platform, application scale, JavaScript programs that run in any browser or in any host.
  • TypeScript tools can dramatically improve your productivity, allowing you to maintain your existing code and continue to use the same JavaScript libraries you already love.
  • Get a quick overview of TypeScript in this recent Five Things episode with Microsoft Technical Fellow Anders Hejlsberg and John Papa.

Tags: TypeScript, TypeScript tools, Fellow Anders Hejlsberg, application-scale JavaScript development, robust tooling experience