remoteinterview / zero

Zero is a web server to simplify web development.

Home Page:https://zeroserver.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node.js, TS: zero tries to compile non-jsx TS as jsx

extempl opened this issue · comments

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.

Thanks! I just pushed a new release with this fix.

Do you have a minimal example that I can add in the tests?

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.