-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Exclude mapped types with optionality modifiers and 'as' clauses from constraint logic #48273
Conversation
@typescript-bot test this |
Heya @ahejlsberg, I've started to run the diff-based community code test suite on this PR at 05560c1. You can monitor the build here. Update: The results are in! |
Heya @ahejlsberg, I've started to run the extended test suite on this PR at 05560c1. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 05560c1. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the abridged perf test suite on this PR at 05560c1. You can monitor the build here. Update: The results are in! |
@ahejlsberg Here they are:Comparison Report - main..48273
System
Hosts
Scenarios
Developer Information: |
@ahejlsberg |
return type.flags & TypeFlags.IndexedAccess && getObjectFlags((type as IndexedAccessType).objectType) & ObjectFlags.Mapped && | ||
!isGenericMappedType((type as IndexedAccessType).objectType) && isGenericIndexType((type as IndexedAccessType).indexType); | ||
let objectType; | ||
return !!(type.flags & TypeFlags.IndexedAccess && getObjectFlags(objectType = (type as IndexedAccessType).objectType) & ObjectFlags.Mapped && |
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.
Seems like this would be improved by De Morgan's law
# Conflicts: # src/compiler/checker.ts
Fixes #48157.
Fixes #48246.