-
Notifications
You must be signed in to change notification settings - Fork 699
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
Render all members of an intersection type #1021
Comments
currently i am playing around a similar problem. I found out you can have multiple keys of same kind in an object.
With that typedoc behaves like using function overload. Currently on this i could not export functions directly. After searching for crazy valid characters of names, i found lots funny chars. now i use \u02D0 (looks like
Now i get two entries in the create docs. |
@MrTelanie that is... horrible. I think your issue, and the original request, would be better off with a custom theme. Rendering all elements of an intersection could quickly become incredibly large, a custom theme to handle this doesn't seem like a bad idea, but rendering everything by default would be problematic. type Z = HTMLElement & File // => Huge number of properties |
until now i thought a custom theme is only for design. i will have a look for that. Thanks to @Gerrit0 |
Marking this as a plugin idea as I think it can be achieved with a plugin cleanly. I might give this a shot eventually, but there are higher priority issues. My idea is that you should be able to annotate a type with This removes the problem where rendering all elements of an intersection could explode in complexity. |
@Gerrit0 Can you give some guidance as to how I could approach writing this plugin? I do need this feature, and if it's not too complex I can try to write it. |
Here's how I would approach this.
It would be really nice to have a transformer API that can eliminate the traversal logic... I've opened #1325 as a place to discuss that and hopefully come up with something. |
Problem
When look at a type I would like to know what's available. For interface/class/etc. I can see their members. It would be great if I can see the members of an intersection type as well in one place. Currently I have to click on each type to view members of each type.
Suggested Solution
Some way to show the expanded member list for a intersection type at its doc so I don't have to do extra clicks to see its members.
The text was updated successfully, but these errors were encountered: