Skip to content
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

@djindjic

Description

@djindjic

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions