--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidClass.ts --- # Input ```ts class D { f(a: D): D | undefined { return; } } export {} ``` # Diagnostics ``` invalidClass.ts:1:7 lint/correctness/noUnusedVariables ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This class is unused. > 1 │ class D { │ ^ 2 │ f(a: D): D | undefined { return; } 3 │ } i Unused variables usually are result of incomplete refactoring, typos and other source of bugs. ``` ``` invalidClass.ts:2:4 lint/correctness/noUnusedVariables FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This parameter is unused. 1 │ class D { > 2 │ f(a: D): D | undefined { return; } │ ^ 3 │ } 4 │ i Unused variables usually are result of incomplete refactoring, typos and other source of bugs. i Unsafe fix: If this is intentional, prepend a with an underscore. 1 1 │ class D { 2 │ - → f(a:·D):·D·|·undefined·{·return;·} 2 │ + → f(_a:·D):·D·|·undefined·{·return;·} 3 3 │ } 4 4 │ ```