This is the 24th part of our DecEmber series–"Countdown to The New Year: 31 Days of Ember Addons". Highlighting a new addon each day until the new year starts, we hope you enjoy learning together with us!
Today we are going to take a look at writing apps in TypeScript - using ember-cli-typescript.
What It Does
ember-cli-typescript addon sets up everything you need to start using TypeScript in your Ember apps and addons. This includes not only configuring Babel to handle TypeScript, but build-time type-checking, in-browser type error reporting, and a whole set of custom blueprints for generating TypeScript versions of everything from routes and controllers to services to components.
ember-cli-typescript also helps addon authors write their addons in TypeScript by handling automatic precompilation and type definition generation when publishing.
Why I Like It
Static typing is a lifesaver, especially in ambitious apps with complex structures and many moving parts. It helps speed up development with rich autocompletion and by catching type errors right in your editor and during the build. It provides a saftey net when refactoring or upgrading that I, frankly, wouldn't want to develop without. And addons written in TypeScript are a joy to use because they ship with type definitions that help guarantee you are using them correctly.
ember-cli-typescript because it handles all of the Ember + TypeScript integration for you and provides a very good set of defaults. It has great documentation, not only on how to user
ember-cli-typescript, but on how to use TypeScript effectively with Ember. And to top it off, an amazing communuty of strong typers has formed around
ember-cli-typescript and many of these individuals can be found on the Ember Community Discord in #e-typescript ready to answer your Ember + TypeScript questions!
Do you use
ember-cli-typescript? Or something else to use TypeScript (or another language) with Ember? We'd love to hear about Ember addons you love for DecEmber in the comments below!