Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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

Copy link
Copy link
@djindjic

Description

@djindjic
Issue body actions

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')<<<<<<);
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.