complete/prefer-unknown-type-annotations
💼 This rule is enabled in the ✅ recommended config.
📝 Require variable type annotations over as unknown assertions.
🔧 This rule is automatically fixable by the
--fix CLI option.
Require variable type annotations over as unknown assertions.
Rule Details
Section titled “Rule Details”// Badconst foo = JSON.parse(fooContents) as unknown;
// Goodconst foo: unknown = JSON.parse(fooContents);Options
Section titled “Options”This rule is not configurable.
