💅 Unexpected removal of type with rule noInferrableTypes #727
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Bug-confirmed
Status: report has been confirmed as a valid bug
S-Needs discussion
Status: needs a discussion to understand criteria
Environment information
Rule name
noInferrableTypes
Playground link
https://biomejs.dev/playground/?code=ZgB1AG4AYwB0AGkAbwBuACAAZABvAFMAbwBtAGUAdABoAGkAbgBnACgAcABhAHIAYQBtADEAOgAgAHMAdAByAGkAbgBnACAAPQAgAG4AdQBsAGwAKQAgAHsACgAgACAACgB9AA%3D%3D
Expected result
: string
should not be removed and the code should stay like it was.Removing type form
param1
will make its type to beany
. If Typescript project would havestrictNullChecks
enabled, then this would not be a problem because there would be a type error with the existing code. But in project, where that is disabled, above code is valid.Code of Conduct
The text was updated successfully, but these errors were encountered: