Nicolò Ribaudo 2691868904 Remove unused variables with the Babel plugin
- functions were already removed
- variables can be removed when their initializer does not have side effects
- classes can be removed when they have no static blocks

Fixes #21337
2026-05-26 16:35:57 +02:00

27 lines
310 B
JavaScript

function f1() {}
f1();
function f2() {
return 1;
}
f2();
function f3() {
before();
throw "test";
}
f3();
function f4() {
before();
}
f4();
var obj = {
method1() {},
method2() {}
};
class C {
method1() {}
method2() {}
}
var arrow1 = () => {};
var arrow2 = () => {};
use(obj, C, arrow1, arrow2);