π Search Terms
unused locals class lint static block declaration
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
https://www.typescriptlang.org/play/?noUnusedLocals=true&isolatedDeclarations=false#code/PTAEAEDsHsFVIK4GcCmATAMtAxgQwDZIBcoALgE4IoBQ12+uSSoAwgIygDe1ooSpuUgEtsXHr1D4UpUADNo0UAF5QbANziAvtW3VZCSNmHRIctgAoAlGN5SZAI1zlloAEwbtQA
π» Code
// @noUnusedLocals: true
class C1 {
static {
let foo = 1;
}
}
π Actual behavior
The error is not reported
π Expected behavior
It should report:
error TS6133: 'foo' is declared but its value is never read.
Additional information about the issue
No response
π Search Terms
unused locals class lint static block declaration
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?noUnusedLocals=true&isolatedDeclarations=false#code/PTAEAEDsHsFVIK4GcCmATAMtAxgQwDZIBcoALgE4IoBQ12+uSSoAwgIygDe1ooSpuUgEtsXHr1D4UpUADNo0UAF5QbANziAvtW3VZCSNmHRIctgAoAlGN5SZAI1zlloAEwbtQA
π» Code
π Actual behavior
The error is not reported
π Expected behavior
It should report:
Additional information about the issue
No response