Skip to content

Conversation

@EzraBrooks
Copy link
Collaborator

@EzraBrooks EzraBrooks commented Nov 13, 2025

One of the two most important TypeScript rules, imo.
Accessing indexed types (maps, arrays, etc.) in JavaScript doesn't ever throw an out of bounds error, but it might return undefined - and TypeScript by default doesn't check against this because so much JavaScript code in the world is written sloppily enough that checking this by default would make it hard to port to TypeScript.

One of the two most important TypeScript rules, imo.
Accessing indexed types (maps, arrays, etc.) in JavaScript
doesn't ever throw an out of bounds error, but it might return
`undefined` - and TypeScript by default doesn't check against
this because so much JavaScript code in the world is written
sloppily enough that checking this by default would make it
hard to port to TypeScript.
@EzraBrooks EzraBrooks force-pushed the enable-noUncheckedIndexedAccess branch from 07c1080 to 5d7ba93 Compare November 13, 2025 21:36
@EzraBrooks EzraBrooks marked this pull request as ready for review November 13, 2025 21:41
@EzraBrooks EzraBrooks enabled auto-merge (squash) November 13, 2025 21:47
@EzraBrooks EzraBrooks merged commit ead196e into develop Nov 13, 2025
14 checks passed
@EzraBrooks EzraBrooks deleted the enable-noUncheckedIndexedAccess branch November 13, 2025 21:51
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.

3 participants