lloyAlloy on GitHub
implicit_any
Docs

implicit_any

Updated
pedanticoff until [lint] strict

A named function parameter, or an empty array literal, with no type.

Pedantic. A parameter of a named function with no annotation is any to the checker, and every use of it goes unchecked. Write the type. A callback passed as an argument is exempt: the checker infers its parameters from the callee.

A binding of an empty [ ] is the same case: local xs = [] names no element type, so the checker reads any[]. Write local xs: T[] = []. A position that carries the type stays silent: an annotated binding, an argument of a typed parameter, a return of a declared return type, and a struct field default.

Set its level in the [lint] table of alloy.toml, or for one file with --@alloy-lint.