Bug: [switch-exhaustiveness-check] False positive with noUncheckedIndexedAccess #10228
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.4.5&fileType=.tsx&code=GYVwdgxgLglg9mABMOcAUAPAXIgzlAJxjAHMBtAXQEpEBvAKESbwHcYoIALRTMgBmp1GzJhACGuAKaIARJxgyswkUwBGBSWIDWAbmXNxUxOAAmk4MUkmlKxGeBiQAGyg3biKJwJwWiMJN8AUQJvAjQAAwBVfwwAB0loK0QANzEnEEkcABJaDH4KAF9wqj0RAvoCoA&eslintrc=N4KABGBEAOCGBOBnApvSAuKABALgT2mUQGN4BLaHAWiIBsyA7HAejiVUgBpwp4BXWkQxhQECJFwEipCtTqMWiAO5kcxABY0AHuth9EOMgDdkDIoiobkxANbDIqeAHs0PAL4g3QA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eFYDArugDTg2RGwAqkWgALdNADW6ACYBJIjPQAPWQEFo0dCTKUO6XgF8QhoA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
No error
Actual Result
"Switch is not exhaustive. Cases not matched: undefined" — even though
case undefined:
is presentAdditional Info
No response
The text was updated successfully, but these errors were encountered: