Installation
npm install --save @types/ember__service
Summary
This package contains type definitions for @ember/service (https://emberjs.com/api/ember/4.0/modules/@ember%2Fservice).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ember__service.
import EmberObject from "@ember/object";
import ComputedProperty from "@ember/object/computed";
export default class Service extends EmberObject {}
export function inject(): ComputedProperty<Service>;
export function inject(target: object, propertyKey: string | symbol): void;
export function inject<K extends keyof Registry>(name: K): ComputedProperty<Registry[K]>;
export function service(): ComputedProperty<Service>;
export function service(target: object, propertyKey: string | symbol): void;
export function service<K extends keyof Registry>(name: K): ComputedProperty<Registry[K]>;
interface Registry extends Record<string, Service> {}
declare module "@ember/owner" {
interface DIRegistry {
service: Registry;
}
}
Additional Details
Credits
These definitions were written by Krystan HuffMenne, James C. Davis, and Peter Wagenet.