noImplicitAny

TypeScript doesn't always try to infer types, and will fall back to the most lenient type (any) when there isn't anything more specific. Functionally, this means TypeScript is operating closer to JavaScript.

However, using any often defeats the purpose of using TypeScript in the first place. The more typed your program is, the more validation and tooling you'll get, meaning you'll run into fewer bugs as you code. Turning on the noImplicitAny flag will issue an error on any variables whose type is implicitly inferred as any.

Was this page helpful?