An overview of the current state of using TypeScript in an Ember App
Recent Articles:
- TypeScript at Slack Or, How I Learned to Stop Worrying & Trust the Compiler
- Tom Dale on 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
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
- 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.
- TypeScript in an Addon
- Super limited, can only use
app
directory and both addon and app need to runember-cli-typescript
addon
- Super limited, can only use
- TypeScript right in your App, go for it
- Simple solutions can be in your own library, borrow glimer build tools.
- See Orbit.js build
- Group mini libraries with lernajs.io
Update now you can use TypeScript on Windows and in Addons, however TypeScript will be a development dependency.