You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way I can set my class file, Client.ts, to compile to ES6 whilst the rest compiles to ES5?
I was getting the error Class constructor Client cannot be invoked without 'new', so I set out to find an answer. According to this answer, I need to set my target to es6, so I did. That meant that Node could not run my code due to the fact that it was in ES6. Apparently, Node supports ES6 classes though, so how would I go about making only that file compile to ES6?
The text was updated successfully, but these errors were encountered:
Is there any way I can set my class file,
Client.ts
, to compile to ES6 whilst the rest compiles to ES5?I was getting the error
Class constructor Client cannot be invoked without 'new'
, so I set out to find an answer. According to this answer, I need to set my target to es6, so I did. That meant that Node could not run my code due to the fact that it was in ES6. Apparently, Node supports ES6 classes though, so how would I go about making only that file compile to ES6?The text was updated successfully, but these errors were encountered: