I didn't know that it is valid syntax, but the code below is validl, and swc now supports it.
Dynamic imports are not widely supported, so it should be transcompiled.
is now compiled as
if the module config is common js.
this is now correctly handled in the loops.
Also, you can now mutate the index variable while iterating.
Previously swc miscompiled
which is wrong. Now it's fixed and swc emits correct output.
I fixed the code generator, parser, typescript stripper, fixer pass, resolver pass and hygiene pass to handle very large binary expressions.
Previously, swc miscompiled
which is wrong. It should be
and swc now emits correct code.
I did very hard work on it, and many edge cases are fixed. I don't think it's production ready yet, but it will be in a near future.