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
Babel and Typescript do not agree on what is valid es6 (even if the maintainers aim for eventual agreement in the tools). As such, that the tsc->babel process will work isn't guaranteed.
The babel transpile process is currently running asynchronously in an otherwise synchronous process, so if babel fails to transpile tsc output, it's not reported to the developer and es6 code (code which babel considered invalid, so probably not great code to have regardless of language version) is produced even though the target is es5.
I sorta-kinda have a patch for this.The easy part is transpiling synchronously. I'm still trying to figure out how to cause the errors generated by babel to be treated as similarly as they can be to TypeScript-level errors. I am not aiming for highlighting problems in the code, but giving the developer the babel error and allowing them to jump to the line number is within reach.
P.S. An easy way to reproduce this is to define a subclass in which you try to manipulate this before calling super(). This isn't legal in ES6. Typescript aims to catch this but right now it doesn't (ref: microsoft/TypeScript#3311). You'll get a .js file in this case with tsc-style ES6 in it where you expected babel-style ES5.
The text was updated successfully, but these errors were encountered:
Babel and Typescript do not agree on what is valid es6 (even if the maintainers aim for eventual agreement in the tools). As such, that the tsc->babel process will work isn't guaranteed.
The babel transpile process is currently running asynchronously in an otherwise synchronous process, so if babel fails to transpile tsc output, it's not reported to the developer and es6 code (code which babel considered invalid, so probably not great code to have regardless of language version) is produced even though the target is es5.
I sorta-kinda have a patch for this.The easy part is transpiling synchronously. I'm still trying to figure out how to cause the errors generated by babel to be treated as similarly as they can be to TypeScript-level errors. I am not aiming for highlighting problems in the code, but giving the developer the babel error and allowing them to jump to the line number is within reach.
P.S. An easy way to reproduce this is to define a subclass in which you try to manipulate
this
before callingsuper()
. This isn't legal in ES6. Typescript aims to catch this but right now it doesn't (ref: microsoft/TypeScript#3311). You'll get a .js file in this case with tsc-style ES6 in it where you expected babel-style ES5.The text was updated successfully, but these errors were encountered: