-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Improve Generic Class + Namespace Intellisense #60943
Comments
I agree there's no need to print type parameters when qualifying the namespace of a type. Showing the constraint as part of the signature in e.g. |
Perfectly happy with showing the constraint, if you mean If you mean that it should still be |
Right, when the name is part of a qualified thing like |
Duplicate of #55582. |
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
π Search Terms
generic class, namespace, intellisense, hover hint
β Viability Checklist
β Suggestion
The hoverhint on namespaces declaration merged with generic classes gets ugly. I would prefer if they were simpler. Here's an example:
Because namespaces cannot access the generics of the class I also think it's a bit misleading of a display and arguably a bug. If it is intentional I would love to know. However I opened this issue as a feature request partially because I would like it to change even if this behavior is intentional.
This same phenomenon does not happen with associated functions only with classes. Perhaps this is because namespaces can be automatically generated on functions:
Compiles to this
.d.ts
file:However I cannot find a way to get a poor intellisense even when I manually add
type
s,const
s etc. so it appears to be a phenomenon exclusive to classes.π Motivating Example
π» Use Cases
When I have a complex class with a great number of associated methods and interfaces the most natural way of organizing seems to be namespaces for this project. It's a bit older and heavily uses globals but that won't be changing any time soon and so this is the most convenient way of being organized.
Unfortunately whenever classes are generic the hover hints become unwieldy and I'd prefer for them not to be.
The text was updated successfully, but these errors were encountered: