Skip to content

Conversation

@mxdvl
Copy link

@mxdvl mxdvl commented Aug 15, 2025

Why make this change?

It’s possible that the compiler incorrectly assumes keys are defined.

Feel free to disregard if you do not believe this to be an actual issue. Here’s what this change does to the compiler.

Note that in both of these examples I assumed noUncheckedIndexedAccess is true, which would make the this kind of bug especially surprising to anyone that enabled that feature…

sindresorhus added a commit that referenced this pull request Aug 15, 2025
sindresorhus added a commit that referenced this pull request Aug 15, 2025
@sindresorhus
Copy link
Owner

I agree, it should be stricter. Can you take a look at #68?

julrichkieffer pushed a commit to julrichkieffer/ts-extras that referenced this pull request Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants