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?
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?