Node.js, TS: zero tries to compile non-jsx TS as jsx
extempl opened this issue · comments
Anton Konovalov commented
In fact it tries to parse type conversion as a JSX tag, like:
const result = <CustomTypeInArray[]>await api.request()
as
result = <CustomTypeInArray />, _a = void 0; // error
_b = ; // error
return [4 /*yield*/, api.request()];
I think, the simplest solution is to not try to compile JSX until it is .jsx
or .tsx
files.
Asad Memon commented
Thanks! I just pushed a new release with this fix.
Do you have a minimal example that I can add in the tests?
Anton Konovalov commented
Hm, can't simulate the minimal example, as well as replicate on my project.
I'll try to get the state of the code on the time I've reported this, but later.