src/content/docs/linter/rules/no-implicit-any-let.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="TypeScript and TSX" icon="seti:typescript"> ## Summary - Rule available since: `v1.4.0` - Diagnostic Category: [`lint/suspicious/noImplicitAnyLet`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). ## How to configure ```json title="biome.json" { "linter": { "rules": { "suspicious": { "noImplicitAnyLet": "error" } } } }## Description
Disallow use of implicit `any` type on variable declarations.
TypeScript variable declaration without any type annotation and initialization have the `any` type.
The any type in TypeScript is a dangerous “escape hatch” from the type system.
Using any disables many type checking rules and is generally best used only as a last resort or when prototyping code.
TypeScript’s [`--noImplicitAny` compiler option](https://www.typescriptlang.org/tsconfig#noImplicitAny) doesn't report this case.
## Examples
### Invalid
```ts
var a;
a = 2;
let b;
b = 1
var a = 1;
let a:number;
var b: number
var b =10;