Bug: [no-unnecessary-type-assertion] problem with asserting querySelector result #83 8000 88
Closed
4 tasks done
Labels
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
working as intended
Issues that are closed as they are working as intended
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.1.6&fileType=.tsx&code=MYewdgzgLgBAZiEMC8MAmJgFcC2BTMKAOgCMQ0BPIgRyzwCcKBlPAGz2ChHoAoBYAFAwYAcgDEOCmzz5CMAHzoAlgDcRAGkEBKGAEMIMABIAVALIAZAKLtZsAD4wwWVqwDcgpXBg8EILYOFfImgKdiI0JQgAB1ZdChRREXcBQVBIWBJdegSMbFtScipaBmZpTm5%2BIVEJKRsCWEUItU0BLWTPb0z6fyqu4KhQvHDImLiEkSTBVPBoGEyALxzMXHqCyho6RhZ2cvoAHhMLaxl6%2BUrhcUlpWwVlZu12rx4FnuEF-sHh6Nj41AnkoA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUkACAXAngA4oDG0AlobgLQrzkB2uA9AwPbWwMOIkrIBDaPmoFi1AcmSJoucmwbooM6G2iQQ4MAF8Q2oA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
First example should not complain because the assertion changes the type.
Actual Result
There is an error "This assertion is unnecessary since it does not change the type of the expression." at the first example.
Additional Info
No response
The text was updated successfully, but these errors were encountered: