UNPKG

@sigi/di

Version:

Dependencies injection library for sigi framework

15 lines 512 B
import { rootInjector } from './root-injector'; export function Injectable(options) { return function (target) { var _a; rootInjector.addProvider({ useClass: target, provide: target, }); for (const provider of (_a = options === null || options === void 0 ? void 0 : options.providers) !== null && _a !== void 0 ? _a : []) { rootInjector.addProvider(provider); } return target; }; } //# sourceMappingURL=injectable.js.map