Skip to content

Suggestion: Reorder properties in HtmlAttribute #38583

Open

Description

@amcasey

After discussing #38399 with Anders Hejlsberg (@ahejlsberg), Ryan Cavanaugh (@RyanCavanaugh), and Daniel Rosenwasser (@DanielRosenwasser) it sounds like one possible improvement we could make to the check time of code consuming JSX.IntrinsicElements (and related libraries) would be to reorder some of the properties in HTMLAttributes so that the ones depending on the type parameter are resolved first when comparing types structurally (i.e. so we hit the variance short-circuit ASAP). We could consider submitting PRs to that effect.

Activity

  1. DanielRosenwasser commented on May 14, 2020

    @DanielRosenwasser
    Member

    Related are:

    though we mostly did this for error-reporting purposes.

    Another similar thing I recall was adding property tags in RxJS to force a little bit of nominality: https://github.com/ReactiveX/rxjs/pull/1474/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions