swc/crates/swc_bundler/tests/fixture/deno-8734/output/entry.inlined.ts
David Sherret 4d993c26b6
fix(es/hygiene): Reduce renaming (#2938)
swc_ecma_transforms_base:
 - `hygiene`: Treat class methods and constructors as a scope.
2021-12-02 07:28:09 +00:00

24 lines
481 B
TypeScript

const m2 = "test";
if (!m2) {
throw new Error('b');
}
class Comparator {
constructor(comp, optionsOrLoose = {
}){
}
parse(comp) {
const m = "another";
if (!m) {
throw new TypeError("Invalid comparator: " + comp);
}
const m1 = m[1];
console.log(m1);
if (!m[2]) {
console.log('other');
}
}
}
const x = new Comparator('boo');
x.parse('test');
export { Comparator as Comparator };