This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Non-module constructor parameter #90
Open
Description
Is possible (and is it relevant question for this repo issues) to have some additional constructor parameter which is not injected module itself? For example coffee_type:
import {Inject} from 'di';
import {Pump} from './pump';
@Inject(Pump)
export class CoffeeMaker {
constructor(pump, coffee_type) {
this.pump = pump;
this.coffee_type = coffee_type;
}
}
let injector = new Injector();
let coffee_maker = injector.get(CoffeeMaker>>>>>('cappuccino')<<<<<<);
Metadata
Metadata
Assignees
Labels
No labels