microsoft / microsoft/TypeScript
Suggestion: Reorder properties in HtmlAttribute
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing issue #38399 and the referenced preact src/jsx.d.ts HTMLAttributes definition around line 765, including its relationship to JSX.IntrinsicElements. Done would require a concrete, validated property-ordering proposal for the type-checking performance improvement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100