Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

annotate helper and SuperConstructor doesn't work #86

Open
markuz-gj opened this issue Dec 15, 2014 · 1 comment
Open

annotate helper and SuperConstructor doesn't work #86

markuz-gj opened this issue Dec 15, 2014 · 1 comment

Comments

@markuz-gj
Copy link

While this works:

@Inject(Foo)
class Parent {
  constructor(foo) {
    this.parentFoo = foo;
  }
}

@Inject(SuperConstructor, Foo)
class Child extends Parent {
  constructor(superConstructor, foo) {
    superConstructor();
    this.childFoo = foo;
  }
}

this doesn't,

class Parent {
  constructor(foo) {
    this.parentFoo = foo;
  }
}
annotate(Parent, new Inject(Foo))

class Child extends Parent {
  constructor(superConstructor, foo) {
    superConstructor();
    this.childFoo = foo;
  }
}
annotate(Child, new Inject(SuperConstructor, Foo))

with the following error message: injector SuperConstructor should support "super" to call multiple parent constructors with annotate helper FAILED

@markuz-gj
Copy link
Author

The fix is simple and I'm about to submit a PR

markuz-gj pushed a commit to markuz-gj/di.js that referenced this issue Dec 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant