Thanks to visit codestin.com
Credit goes to github.com

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.

Feature: Inject class without intantiating #30

Open
@jeffbcross

Description

@jeffbcross

I'd like to be able to inject a un-instantiated class, so I can more easily mock classes for tests. Right now, here's what I'd have to do

function GetPromise () {
  return Promise;
}
@Inject(GetPromise)
class Deferred {
  constructor(Promise) {
    this.promise = new Promise();
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions