-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid @Inject Decorator declaration on property #68
Comments
The same issue |
Same issue here 😞 . Any solutions/workarounds? |
Looks like youre not using This could be related to evanw/esbuild#412 |
Hi, I have also found some suggestions to add some bubel plugins such as: |
Documentation says that when injecting on a property 2 arguments are given, the class and the property name, and also explains why that is the case IN TYPESCRIPT: However, it looks like other interpreters are able to pass also the third parameter. So, to support both cases, the check in decorators.ts line 149 should be different:
It would still be missing the case of the decorator used on a method, but would work in react. |
I seem to be hitting an error when I am trying to inject a property on my class.
The injected value is bound, it is an abstract class, and it works perfectly fine if I force the Inject declaration to always go to the property declaration here
typescript-ioc/src/decorators.ts
Lines 149 to 150 in 623a58a
The issue seems to be that my
args
is an array of length 3, where the third argument is an object.The text was updated successfully, but these errors were encountered: