@jable/inject
Version:
Inject dependencies into injectable classes
23 lines (22 loc) • 552 B
TypeScript
/**
* js-injectable helper
*
* @export
* @class Injector
*/
export declare class Injector {
/**
* Instantiate a class decorated with Injectable
*
* @static
* @template T Type of class
* @param {{new(...args: any[]): T}} newType The class to instantiate
* @param {...any[]} args Arguments, use for excluded injectables
* @returns {T} New instance of T
*
* @memberOf Injector
*/
static inject<T>(newType: {
new (...args: any[]): T;
}, ...args: any[]): T;
}