-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Rest paramters causing error in node 4.2.6 #7215
Comments
If you target ES6, TypeScript is going to emit ES6 code (which includes rest args). If your runtime doesn't support all ES6 features, you can target ES5, or choose not to use the unsupported ES6 features. |
i cannot use es5 since i am using async/await and typescript is automatically generating the rest params how to stop compiler to generate the rest params?? |
here is the issue tracking more granular transformations: #4692 |
@mhegazy great ,in which version it is being targeted ?? |
We are starting with breaking up the lib in the next release, see #6974, the emit transformations comes next. |
@pranaydutta89 I came across the same problem as yours. |
I am using typescript for my nodejs app, in es6 compilation mode, in some of my classes the generated js code looks like
class mediasController extends lib.baseClasses.apiControllerAsyncBase().apiControllerAsync { constructor(...args) { super(...args); this.xyz = {}; }
it has the es6 rest parameters which nodejs says as "unexpected token...",
please provide me with an alternative or solution of the same .
The text was updated successfully, but these errors were encountered: