2023-04-15 06:21:50 +00:00
|
|
|
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.
|
2023-04-15 06:21:50 +00:00
|
|
|
* @param injectedService Service class, usually a Protocol
|
2020-11-29 19:23:43 +00:00
|
|
|
*/
|
2023-04-15 06:21:50 +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
|
|
|
};
|
|
|
|
}
|