How to use this library without typescript
I'm submitting a...
[ ] Regression
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
I tried to use this library without typescript. Build with babel (env and transform-decorators) and all good, but in resolvers i tried to use Args parameter decorator and received build exception. After i used transform-function-parameter-decorators babel plugin, but have another exception (Cannot read property 'constructor' of undefined), maybe, because decorator did't have metadata.
Expected behavior
Make an alternative class method decorators for Args, Parent and other function parameter decorators
Minimal reproduction of the problem with instructions
.babelrc
{
"presets": ["env"],
"plugins": [
"transform-decorators-legacy",
"transform-function-parameter-decorators"
]
}
What is the motivation / use case for changing the behavior?
Maybe some people use nestjs without typescript and nestjs have (https://github.com/nestjs/javascript-starter).
Environment
Nest version:5.4.0
For Tooling issues:
- Node version: 10
- Platform: Mac
You should use @Bind() decorator, for example:
@Bind(Args('id'))
create(id) {}
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.