-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Fix2 get constraint of indexed access #17912
Merged
Merged
Commits on Aug 18, 2017
-
1. `T[K]` now correctly produces `number` when `K extends string, T extends Record<K, number>`. 2. `T[K]` no longer allows any type to be assigned to it when `T extends object, K extends keyof T`. Previously both of these cases failed in getConstraintOfIndexedAccessType because both bases followed `K`'s base constraint to `string` and then incorrectly produced `any` for types (like `object`) with no string index signature. In (1), this produced an error in checkBinaryLikeExpression`. In (2), this failed to produce an error in `checkTypeRelatedTo`.
Configuration menu - View commit details
-
Copy full SHA for dc85623 - Browse repository at this point
Copy the full SHA dc85623View commit details -
Configuration menu - View commit details
-
Copy full SHA for ecae295 - Browse repository at this point
Copy the full SHA ecae295View commit details
Commits on Aug 24, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 85b0969 - Browse repository at this point
Copy the full SHA 85b0969View commit details
Commits on Aug 28, 2017
-
Disallow T[K] = T[keyof T] where K extends keyof T
`K = keyof T` was already correctly disallowed.
Configuration menu - View commit details
-
Copy full SHA for 04339d2 - Browse repository at this point
Copy the full SHA 04339d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 20e5798 - Browse repository at this point
Copy the full SHA 20e5798View commit details -
Merge branch 'master' into fix2-getConstraintOfIndexedAccess
Also fix test failure from last commit.
Configuration menu - View commit details
-
Copy full SHA for 28a6ac3 - Browse repository at this point
Copy the full SHA 28a6ac3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f646da - Browse repository at this point
Copy the full SHA 2f646daView commit details
Commits on Dec 4, 2017
-
Configuration menu - View commit details
-
Copy full SHA for dd0fa41 - Browse repository at this point
Copy the full SHA dd0fa41View commit details -
After merging with master, even erroneous tests generate types and symbols baselines
Configuration menu - View commit details
-
Copy full SHA for 71b7429 - Browse repository at this point
Copy the full SHA 71b7429View commit details
Commits on Jan 10, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 7dbea0e - Browse repository at this point
Copy the full SHA 7dbea0eView commit details -
Handle indexed mapped types in transformIndexedAccessType
Also rename transformIndexedAccessType to simplifyIndexedAccessType
Configuration menu - View commit details
-
Copy full SHA for 0b23811 - Browse repository at this point
Copy the full SHA 0b23811View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f45373 - Browse repository at this point
Copy the full SHA 8f45373View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.