core/src/plugin/decorators/service.ts

12 lines
322 B
TypeScript
Raw Normal View History

import 'reflect-metadata';
2020-11-28 13:34:34 +00:00
2020-11-29 19:23:43 +00:00
/**
* Declare this plugin as one that utilises services.
* @param injectedService Service class, usually a Protocol
2020-11-29 19:23:43 +00:00
*/
export function InjectService(injectedService: any) {
return (constructor: any): void => {
Reflect.defineMetadata('sb:service', injectedService, constructor);
2020-11-28 13:34:34 +00:00
};
}