typescripttsconfig

Change typescript config to don't accept 'any'


Is there any way to make the tsConfig to stop accepting the 'any' type. I have already added "noImplicitAny": true but still accepting 'any' as a type.


Solution

  • "noImplicitAny": true works for implicit any (so there's an error if a type is inferred as any, not when you explicitly write any in your code).

    There is a check for this in eslint-typescript though.