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

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();
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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