Consumers will need to do the following in order to take advantage of this type information.
Explicitly indicate the type of this service with a type annotation
app/components/x-foo.ts
import Component from '@ember/component';
import ComputedProperty from '@ember/object/computed';
import { inject } from '@ember/service';
import FlashService from 'ember-cli-flash/services/flash-messages';
export default class XFooComponent extends Component {
public flashMessages: ComputedProperty<FlashService> = inject();
public onSuccess() {
// Type-check is happy with this!
this.get('flashMessages').success('Success!');
}
}
Fixes #257
Consumers will need to do the following in order to take advantage of this type information.
Explicitly indicate the type of this service with a type annotation
app/components/x-foo.ts