This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
no-inferrable-types
rule doesn't detect Infinity
as an inferrable numeric literal
#2777
Labels
Milestone
Bug Report
The
no-inferrable-types
rule should trigger if a variable is assigned the value ofInfinity
(or-Infinity
).The line in the link below is where the rule checks for a
ts.SyntaxKind.NumericLiteral
. I took a quick look through the TS code, but wasn't able to find howInfinity
is handled. It doesn't seem to be included as ats.SyntaxKind.NumericLiteral
(or this rule would work), nor does there seem to be ats.SyntaxKind.InfinityKeyword
.https://github.com/palantir/tslint/blob/master/src/rules/noInferrableTypesRule.ts#L112
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
The
no-inferrable-types
message is not shownExpected behavior
The
no-inferrable-types
message is shownThe text was updated successfully, but these errors were encountered: