-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
loopback/context does not inject arguments to constructor of decorated class #2946
Comments
@raymondfeng, could you please help? Thanks. |
@checkmatez Interesting. I'll investigate. |
raymondfeng
added a commit
that referenced
this issue
May 24, 2019
7 tasks
raymondfeng
added a commit
that referenced
this issue
May 24, 2019
raymondfeng
added a commit
that referenced
this issue
May 24, 2019
raymondfeng
added a commit
that referenced
this issue
May 24, 2019
raymondfeng
added a commit
that referenced
this issue
May 24, 2019
@checkmatez @raymondfeng , with the PR #2954 landed, is this issue good to close? |
Looks good, thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description / Steps to reproduce / Feature proposal
loopback/context does not inject arguments to constructor of decorated class.
Repro: https://codesandbox.io/embed/loopbackcontext-bug-with-decorator-zdedp
Current Behavior
Dependencies doesn't not get injected.
Expected Behavior
Dependencies get injected.
This was introduced with 8c0bdb6#diff-c1d762637c20a39c3e01ff4c7d440f03R307
Relevant issue: #1565
This prevents using class properties in custom decorators, since Typescript moves them to implicit constructor, so class.toString() will contain constructor and will match against regular expression. Also this is really hacky way :)
Not sure what the fix would be...
The text was updated successfully, but these errors were encountered: