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

Fix Signature handling for unions and generics #390

Merged
merged 2 commits into from Apr 1, 2022
Merged

Commits on Apr 1, 2022

  1. Copy the full SHA
    9c9f023 View commit details
    Browse the repository at this point in the history
  2. Fix type distributivity in Glimmer Component Signature

    When using a `keyof` type to check whether the type parameter for
    Glimmer Component is a `Signature` or the classic `Args`-only type, if
    we do not force TS to distribute over union types, it resolves the
    `keyof` check for union types with no shared members as `never`, and
    `never extends <anything>` is always true. This in turn meant that for
    all such unions, as well as for cases where users were providing generic
    types which could then be further extended in their own subclasses.
    
    Accordingly, introduce the standard technique TypeScript provides for
    opting into distributivity: conditional types are documented to support
    exactly this.
    chriskrycho committed Apr 1, 2022
    Copy the full SHA
    ad429d5 View commit details
    Browse the repository at this point in the history