--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidClass.ts --- # Input ```ts class Greeter { constructor(param: Array) {} } class Greeter { message: any; } class Greeter { message: Array; } class Greeter { message: any[]; } class Greeter { message: Array>; } class Greeter { message: Array; } class Foo extends Bar {} abstract class Foo extends Bar {} abstract class Foo implements Bar, Baz {} new Foo() Foo() ``` # Diagnostics ``` invalidClass.ts:2:27 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 1 │ class Greeter { > 2 │ constructor(param: Array) {} │ ^^^ 3 │ } 4 │ i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:6:11 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 5 │ class Greeter { > 6 │ message: any; │ ^^^ 7 │ } 8 │ i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:10:17 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 9 │ class Greeter { > 10 │ message: Array; │ ^^^ 11 │ } 12 │ i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:14:11 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 13 │ class Greeter { > 14 │ message: any[]; │ ^^^ 15 │ } 16 │ i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:18:23 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 17 │ class Greeter { > 18 │ message: Array>; │ ^^^ 19 │ } 20 │ i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:22:17 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 21 │ class Greeter { > 22 │ message: Array; │ ^^^ 23 │ } 24 │ i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:25:15 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 23 │ } 24 │ > 25 │ class Foo extends Bar {} │ ^^^ 26 │ 27 │ abstract class Foo extends Bar {} i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:25:32 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 23 │ } 24 │ > 25 │ class Foo extends Bar {} │ ^^^ 26 │ 27 │ abstract class Foo extends Bar {} i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:27:24 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 25 │ class Foo extends Bar {} 26 │ > 27 │ abstract class Foo extends Bar {} │ ^^^ 28 │ 29 │ abstract class Foo implements Bar, Baz {} i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:27:41 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 25 │ class Foo extends Bar {} 26 │ > 27 │ abstract class Foo extends Bar {} │ ^^^ 28 │ 29 │ abstract class Foo implements Bar, Baz {} i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:29:24 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 27 │ abstract class Foo extends Bar {} 28 │ > 29 │ abstract class Foo implements Bar, Baz {} │ ^^^ 30 │ 31 │ new Foo() i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:29:44 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 27 │ abstract class Foo extends Bar {} 28 │ > 29 │ abstract class Foo implements Bar, Baz {} │ ^^^ 30 │ 31 │ new Foo() i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:29:54 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 27 │ abstract class Foo extends Bar {} 28 │ > 29 │ abstract class Foo implements Bar, Baz {} │ ^^^ 30 │ 31 │ new Foo() i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:31:9 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 29 │ abstract class Foo implements Bar, Baz {} 30 │ > 31 │ new Foo() │ ^^^ 32 │ 33 │ Foo() i any disables many type checking rules. Its use should be avoided. ``` ``` invalidClass.ts:33:5 lint/suspicious/noExplicitAny ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected any. Specify a different type. 31 │ new Foo() 32 │ > 33 │ Foo() │ ^^^ 34 │ i any disables many type checking rules. Its use should be avoided. ```