You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 19, 2024. It is now read-only.
For diagnostics emitted in attribute argument syntax nodes that are typeof expressions, the error lies on the types themselves, not the fact that a typeof expression was used. Therefore, semantically it would make more sense to only highlight the type that was used instead of the whole expression.
Another benefit is that it reduces clutter by having smaller chunks of code being highlighted with red squiggles.
Drawbacks
Smaller type names will be harder to distinguish an error on. The main problem would be those with too short names, of up to about 3 letters which seem to be common enough. In a dense document, along with the syntax that generic type arguments come with, users could have a harder time distinguishing where the error is at without resorting to having the IDE navigate them.
Motivation
For diagnostics emitted in attribute argument syntax nodes that are
typeofexpressions, the error lies on the types themselves, not the fact that atypeofexpression was used. Therefore, semantically it would make more sense to only highlight the type that was used instead of the whole expression.Another benefit is that it reduces clutter by having smaller chunks of code being highlighted with red squiggles.
Drawbacks
Smaller type names will be harder to distinguish an error on. The main problem would be those with too short names, of up to about 3 letters which seem to be common enough. In a dense document, along with the syntax that generic type arguments come with, users could have a harder time distinguishing where the error is at without resorting to having the IDE navigate them.
Example
Current:
Proposed: