Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JavaScriptures 2 - TypeScript

JavaScriptures 2 - TypeScript

Artsy Open Source

April 10, 2018

More Decks by Artsy Open Source

Other Decks in Programming


  1. • It can make stepping into new repos less daunting

    Easier to get acclimated to new repos
  2. • When developing in TS (as opposed to normal JS),

    it’s clear what exactly one expects to happen Keeps code clear
  3. • It’s nice to be able to easily see the

    schema of an application as opposed to maintaining it in your head as you go along Speeds up some parts of the dev process
  4. • When you change something about your schema, you can

    immediately see where breaking changes exist because the type checker will throw errors Allows you to catch errors sooner
  5. • Currently involves (at least in our case) a complex

    dance between Babel, Webpack, Node, Jest, and possibly more. However, as we move more projects to Babel 7, we can drastically simplify this by utilising its ability to parse TypeScript code. • To debug this sort of thing, one has to look at the docs and github issues of several different projects; there is no singular resource for TS tooling (although our Artsy Engineering blog post on the topic comes close) Setting up tooling can be tedious
  6. • Most JS projects won’t. • Over 4000 community maintained

    type declarations at github.com/DefinitelyTyped/DefinitelyTyped. E.g. @types/react on NPM. • Details on how to write type declarations can be found here: www.typescriptlang.org/docs/handbook/declaration-files/introduction.html Libraries may not come with TS types