UNPKG

angular-style-injector

Version:

Dependency injection container inspired by Angular's Injector.

15 lines (14 loc) 521 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Injectable = Injectable; /** * @description Decorator that marks a class as available to be provided and injected as a dependency. * Marking a class with @Injectable ensures that the compiler will generate * the necessary metadata to create the class's dependencies when the class is injected. **/ function Injectable() { return (constructor) => { constructor.__injectable__ = true; return constructor; }; }