-
Notifications
You must be signed in to change notification settings - Fork 710
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
fix: Resolve the name of parameters referring to default exports #2574
Conversation
0cdcd29
to
6a928dc
Compare
@Gerrit0 I tried to find a way to resolve those symbols as their re-exported name but I couldn't find I decent solution that didn't break other tests. This seems to be the way that type checker wants to resolve those types. Do you have any ideas for how I would determine if a given type was re-exported to apply this logic? |
I am noticing that the |
I incorrectly assumed that making the change to derive the name in the type converter would just make that work - given that the type converter is getting the resolved type, I think it's reasonable to leave the behavior as is |
@Gerrit0 Any chance I could get a re-review on this soon? |
I meant to merge it last weekend, unfortunately it fell off my list. I'll definitely get it in next weekend! |
Thanks! |
Hello! My team recently discovered some strange behavior with TypeDoc resolving the type name of a class as
default
instead of the name of the class. I discovered that this happens when the following constraints are met:Note: This can only happen if the function/class is declared using
export default class
orexport default function
, since TypeScript will resolve the type back to any normalexport class
orexport function
with the correct name.I noticed that TypeScript itself resolves the parameter's symbol type as the name
default
instead of the name of the type. I'm unsure if this is correct, so I applied conditional logic to help handle this particular case.Here's a visual example from our generated docs:
...where the correct type should be
DataTable
.Please let me know if a better solution is more desirable 🙏