Changelog: swc v1.1.43

Bugfixes#

New features#

Decorators on parameters (#775)#

The following is valid TypeScript code:

class MyClass {
myMethod(@myDecorator myParameter: string) {}
}

Previously, swc cannot parse this as swc did not support decorators on a parameter. Thanks to @dsherret, the parser gets abillity to handle it.

No-substitution template literals as type (#767)#

The code below is valid, and swc now supports the syntax. Implemented by @dsherret.

export type Permission = `CREATE_INSTANT_INVITE`;

Performance improvements#

Parser (#774)#

Riccardo Dambrosio sent me an email which contains how can I improve the performance of parser. Based on the fact that 99% of input is ascii, he suggested short-circuiting ascii letters in the lexer.

I've tested it and it makes the parser of swc 10% ~ 13% faster.