I am trying to make my code as strict as possible with TS. Is there a way to make the following declaration using "any" as a type to throw an error since it should be a "string" type?
const foo: any = "bar"
I am trying to make my code as strict as possible with TS. Is there a way to make the following declaration using "any" as a type to throw an error since it should be a "string" type?
const foo: any = "bar"
You can have a tslint/eslint rule to prevent it. Found some documentation here https://palantir.github.io/tslint/rules/no-any/