Whenever using a decorator to declare a class field the framework sets up for you, you should mark it with
declare. That includes all service and controller injections as well as all Ember Data attributes and relationships.
Normally, TypeScript determines whether a property is definitely not
undefined by checking what you do in the constructor. In the case of service injections, controller injections, or Ember Data model decorations, though, TypeScript does not have visibility into how instances of the class are initialized. The
declare annotation informs TypeScript that a declaration is defined somewhere else, outside its scope.