-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed accidental undefined
omissions in union props sourced from index types under noUncheckedIndexedAccess
#61233
base: main
Are you sure you want to change the base?
Fixed accidental undefined
omissions in union props sourced from index types under noUncheckedIndexedAccess
#61233
Conversation
…dex type under `noUncheckedIndexedAccess`
2964f64
to
464abcf
Compare
@typescript-bot test it |
Hey @jakebailey, the results of running the DT tests are ready. Everything looks the same! |
@jakebailey Here are the results of running the user tests with tsc comparing Everything looks good! |
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
@@ -15034,6 +15034,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { | |||
propTypes.push(type); | |||
} | |||
addRange(propTypes, indexTypes); | |||
if (indexTypes && compilerOptions.noUncheckedIndexedAccess) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm just not familiar with this part of the code, but how can this get away with being unconditionally added when this flag is enabled? Are there code paths above this that are missing this too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The preceding branch requires !indexTypes
and this flag is only relevant to existing indexTypes
.
fixes #61225