Skip to content
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 12 commits into from
Jan 10, 2018
Merged

Commits on Aug 18, 2017

  1. Fix #17069 and #15371

    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`.
    sandersn committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    dc85623 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ecae295 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2017

  1. Configuration menu
    Copy the full SHA
    85b0969 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2017

  1. Disallow T[K] = T[keyof T] where K extends keyof T

    `K = keyof T` was already correctly disallowed.
    sandersn committed Aug 28, 2017
    Configuration menu
    Copy the full SHA
    04339d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20e5798 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' into fix2-getConstraintOfIndexedAccess

    Also fix test failure from last commit.
    sandersn committed Aug 28, 2017
    Configuration menu
    Copy the full SHA
    28a6ac3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f646da View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2017

  1. Configuration menu
    Copy the full SHA
    dd0fa41 View commit details
    Browse the repository at this point in the history
  2. Update baselines

    After merging with master, even erroneous tests generate types and
    symbols baselines
    sandersn committed Dec 4, 2017
    Configuration menu
    Copy the full SHA
    71b7429 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2018

  1. Configuration menu
    Copy the full SHA
    7dbea0e View commit details
    Browse the repository at this point in the history
  2. Handle indexed mapped types in transformIndexedAccessType

    Also rename transformIndexedAccessType to simplifyIndexedAccessType
    sandersn committed Jan 10, 2018
    Configuration menu
    Copy the full SHA
    0b23811 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8f45373 View commit details
    Browse the repository at this point in the history