Skip to content

Instantly share code, notes, and snippets.

@pixelhandler
Last active June 27, 2018 20:32
Show Gist options
  • Save pixelhandler/5b046fdf12e62cdbe2028b2b169fa5fe to your computer and use it in GitHub Desktop.
Save pixelhandler/5b046fdf12e62cdbe2028b2b169fa5fe to your computer and use it in GitHub Desktop.
Add Some TypeScript to your Ember App

Add Some TypeScript to your Ember App

An overview of the current state of using TypeScript in an Ember App

Recent Articles:

What is TypeScript

  • Static Analysis

A static type checker does not modify how your code behaves at runtime — instead, it analyzes your code and attempts to infer types wherever possible, warning the developer before code ships.

Felix Rieseberg

Why?

Most transpiled languages exist because they want to correct some perceived deficiencies in JavaScript. It’s hard to quantify, but you can feel the respect that the TypeScript team has for JavaScript. They’re not trying to rescue an inherently flawed language; instead, they’re trying to help a language they love reach new heights.

I love TypeScript because the delta between it and JavaScript is so small. In fact, you can take any JavaScript file, change the extension to .ts, and boom, you’ve got a valid TypeScript file.

Because TypeScript is a superset of JavaScript, you’ve actually been writing TypeScript this whole time.

-Tom Dale

  • Discover hidden bugs (do humans mispell?)
  • Powerful the editor integration

Today

  • We have Glimmer.js, TypeScript] is first class, use at your pleasure.
  • Also @glimmer/build, write your own libary and use broccoli build for free.
  • Install ember-cli-typescript and use .ts in your app directory
  • Enable TypeScript without changing any code, add some simple type declarations to start.

What I learned

Links:

@pixelhandler
Copy link
Author

Update now you can use TypeScript on Windows and in Addons, however TypeScript will be a development dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment