Previously, swc miscompiled
This issue happened because class_properties pass did not check if an identifier used in a class constructor is reference. The bug is fixed by changing identifier only if it's used as a binding identifier.
The name collision check is required because in the code below,
bar should be
"bar", not "foo".
swc now handle decorators on properties properly, even if it does not have default value.
Previously typescript_strip pass removed class properties without value, but I removed such behavior and it works.
While babel does not support this feature, I implemented it because
tsc supports it. Code like below now works well.
swc_ecma_parser becomes faster by reducing the size of error struct and by providing single-threaded error reporting. Also it reduced possibility of stack overflow.
swc used nightly rustc, which can have some bugs. After very hard work, I've managed to make swc to use stable rustc.
This would allow more rust users to use swc as a crate for their own projects.