--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidVariable.ts --- # Input ```ts const number: any = 1 const anyArray: any[] = [] const anyMatrix: any[][] = [] const anyArray2: Array = [] const anyMatrix2: Array> = [] const anyGenerics: T> = [] const bar5 = function (...args: any) {} const baz5 = (...args: any) => {} const test = >() => {}; ``` # Diagnostics ``` invalidVariable.ts:1:15 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. > 1 │ const number: any = 1 │ ^^^ 2 │ 3 │ const anyArray: any[] = [] i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:3:17 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 1 │ const number: any = 1 2 │ > 3 │ const anyArray: any[] = [] │ ^^^ 4 │ 5 │ const anyMatrix: any[][] = [] i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:5:18 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 3 │ const anyArray: any[] = [] 4 │ > 5 │ const anyMatrix: any[][] = [] │ ^^^ 6 │ 7 │ const anyArray2: Array = [] i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:7:24 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 5 │ const anyMatrix: any[][] = [] 6 │ > 7 │ const anyArray2: Array = [] │ ^^^ 8 │ 9 │ const anyMatrix2: Array> = [] i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:9:31 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 7 │ const anyArray2: Array = [] 8 │ > 9 │ const anyMatrix2: Array> = [] │ ^^^ 10 │ 11 │ const anyGenerics: T> = [] i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:11:22 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 9 │ const anyMatrix2: Array> = [] 10 │ > 11 │ const anyGenerics: T> = [] │ ^^^ 12 │ 13 │ const bar5 = function (...args: any) {} i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:11:33 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 9 │ const anyMatrix2: Array> = [] 10 │ > 11 │ const anyGenerics: T> = [] │ ^^^ 12 │ 13 │ const bar5 = function (...args: any) {} i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:13:33 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 11 │ const anyGenerics: T> = [] 12 │ > 13 │ const bar5 = function (...args: any) {} │ ^^^ 14 │ 15 │ const baz5 = (...args: any) => {} i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:15:24 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 13 │ const bar5 = function (...args: any) {} 14 │ > 15 │ const baz5 = (...args: any) => {} │ ^^^ 16 │ 17 │ const test = >() => {}; i any disables many type checking rules. Its use should be avoided. ``` ``` invalidVariable.ts:17:33 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 15 │ const baz5 = (...args: any) => {} 16 │ > 17 │ const test = >() => {}; │ ^^^ 18 │ i any disables many type checking rules. Its use should be avoided. ```