ember.js
ember.js copied to clipboard
Use service registry in owner.lookup
This enhances the type of owner.lookup so it respects the (already existing) service type registry. This means that owner.lookup('service:foo') will have the correct type as long as you do:
declare module '@ember/service' {
interface Registry {
'foo': MyFooService;
}
}
I recognize that this Registry might not be the long-term plan, but as long as it's defined and supported by the service injection decorators it seems helpful to also support it in lookup.