--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.ts --- # Input ```ts let someVar1; someVar1 = '123'; someVar1 = 123; var someVar1; someVar1 = '123'; someVar1 = 123; let x = 0, y, z = 0; var x = 0, y, z = 0; for(let a = 0, b; a < 5; a++) {} function ex() { let b; } ``` # Diagnostics ``` invalid.ts:1:5 lint/suspicious/noImplicitAnyLet ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This variable implicitly has the any type. > 1 │ let someVar1; │ ^^^^^^^^ 2 │ someVar1 = '123'; 3 │ someVar1 = 123; i Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value. ``` ``` invalid.ts:5:5 lint/suspicious/noImplicitAnyLet ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This variable implicitly has the any type. 3 │ someVar1 = 123; 4 │ > 5 │ var someVar1; │ ^^^^^^^^ 6 │ someVar1 = '123'; 7 │ someVar1 = 123; i Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value. ``` ``` invalid.ts:9:12 lint/suspicious/noImplicitAnyLet ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This variable implicitly has the any type. 7 │ someVar1 = 123; 8 │ > 9 │ let x = 0, y, z = 0; │ ^ 10 │ var x = 0, y, z = 0; 11 │ for(let a = 0, b; a < 5; a++) {} i Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value. ``` ``` invalid.ts:10:12 lint/suspicious/noImplicitAnyLet ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This variable implicitly has the any type. 9 │ let x = 0, y, z = 0; > 10 │ var x = 0, y, z = 0; │ ^ 11 │ for(let a = 0, b; a < 5; a++) {} 12 │ i Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value. ``` ``` invalid.ts:11:16 lint/suspicious/noImplicitAnyLet ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This variable implicitly has the any type. 9 │ let x = 0, y, z = 0; 10 │ var x = 0, y, z = 0; > 11 │ for(let a = 0, b; a < 5; a++) {} │ ^ 12 │ 13 │ function ex() { i Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value. ``` ``` invalid.ts:14:9 lint/suspicious/noImplicitAnyLet ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This variable implicitly has the any type. 13 │ function ex() { > 14 │ let b; │ ^ 15 │ } 16 │ i Variable declarations without type annotation and initialization implicitly have the any type. Declare a type or initialize the variable with some value. ```