Changelog: swc v1.1.49

Bugfixes#

typescript strip pass (#800)#

Previously, swc did not drop type parameters in classes. This caused

export class FeatureSet<Name extends string> {
log(a: Name) {
console.log(a);
}
}

to be compiled as

export class FeatureSet<Name extends string> {
log(a) {
console.log(a);
}
}

which is obviously not a valid javascript. This is now fixed and swc emits

export class FeatureSet {
log(a) {
console.log(a);
}
}

(new) reserved words pass (#801)#

Previously swc did not handle keywords if you target es5+. But it's wrong because es2019 also has reserved words. So I added a new pass to rename reserved words.

Problematic codes include

export class Foo {
delete(object: string, key: string) {
delete object[key];
}
}

block scoping pass (#803)#

The block_scoping pass emits almost identical output with babel. It can now handle continue, break and return correctly.