mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
22 lines
473 B
TypeScript
22 lines
473 B
TypeScript
const m = "test";
|
|
if (!m) {
|
|
throw new Error('b');
|
|
}
|
|
class Comparator {
|
|
constructor(comp, optionsOrLoose = {}){}
|
|
parse(comp) {
|
|
const m2 = "another";
|
|
if (!m2) {
|
|
throw new TypeError("Invalid comparator: " + comp);
|
|
}
|
|
const m1 = m2[1];
|
|
console.log(m1);
|
|
if (!m2[2]) {
|
|
console.log('other');
|
|
}
|
|
}
|
|
}
|
|
const x = new Comparator('boo');
|
|
x.parse('test');
|
|
export { Comparator as Comparator };
|