-
Notifications
You must be signed in to change notification settings - Fork 889
no-unnecessary-type-assertion
complains over valid code
#3505
Comments
@jeffijoe can you please try to make a create a minimal repro so I can debug this locally? |
@ajafff of course! I've attached a ZIP.
Now run |
I took a look. This is a downstream issue that is caused by the package Moral of the story: Don't trust linter configs written by people who rely on ASI 😛. |
@aluanhaddad what is the issue with the |
@aluanhaddad thanks for digging into this. @jeffijoe This is actually caused by |
@jeffijoe I was just trying to get your goat 😃 |
@ajafff I just read through that issue, not sure what the solution is? 😄 |
@jeffijoe sorry, I picked the wrong of the dozens of similar issues. #3478 (comment) provides more information |
@ajafff thanks! 👍 Too bad workarounds are needed though. 😞 |
I'm running into a similar issue with this code: Does this sound like the same root cause, @ajafff, or should I submit a new issue? |
@buu700 if you disable |
Got it, thanks! Just tested with |
Probably a bug on tslint? palantir/tslint#3505
Bug Report
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
no-unnecessary-type-assertion
complains overresponse
, even thoughresponse
isAxiosResponse<any> | undefined
Expected behavior
It should not error.
The text was updated successfully, but these errors were encountered: