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

Suggestion: Reorder properties in HtmlAttribute #38583

Open
amcasey opened this issue May 14, 2020 · 1 comment
Open

Suggestion: Reorder properties in HtmlAttribute #38583

amcasey opened this issue May 14, 2020 · 1 comment
Labels
Domain: Performance Reports of unusually slow behavior In Discussion Not yet reached consensus Suggestion An idea for TypeScript

Comments

@amcasey
Copy link
Member

amcasey commented May 14, 2020

After discussing #38399 with @ahejlsberg, @RyanCavanaugh, and @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.

@DanielRosenwasser
Copy link
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
Labels
Domain: Performance Reports of unusually slow behavior In Discussion Not yet reached consensus Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants