You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeScript failing to narrow field types indexed w/ const assertions #45965
First seen in 4.1.2, reproduced in 4.4.3 and 4.5.0-dev.20210919.
This is the behavior in every version I tried, and I reviewed the FAQ for entries about "Type System Behavior", "Type Guards", "Things That Don't Work"
Activity
IllusionMH commentedon Sep 20, 2021
Looks like duplicate of #44899 and linked issues.
easyrider commentedon Sep 20, 2021
This is also possibly a #10530 duplicate - an issue that appears frequently since 2016, the solution was already proposed as a PR but was declined.
bsuth commentedon Sep 21, 2021
indeed this seems to be a duplicate, closing in favor of #10530