-
-
Notifications
You must be signed in to change notification settings - Fork 734
Adding support for intersection types #461
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
Comments
Anyone? Even some tips or tricks from your experience of debugging typedoc would be handy for me figuring it out. |
The JSON output is helpful when trying to understand how your code was parsed. See the |
Hi aciccarello. Thanks for replying. As you can see in my original post I'm already getting the json output. I'm hoping someone with experience developing typedoc can help me out with whether what I'm trying to fix in the source code is possible. In lieu of that, some tips on debugging typedoc would be helpful. I've set up vsCode as my debugger and so far I haven't found a good spot to put a breakpoint. Even with the small sample programs I'm running it with there are hundreds of tokens to step through to figure out what's going on. I'm sure I'll get there eventually, but I'd hoped with a bit of advice I could speed up the process. |
Oh sorry, I should have read more carefully. I'd say you are on the right track. But since someone else wrote most of the source I can't give you too much more info. |
I noticed that intersection types were not supported in the json output so I thought I'd have a go at adding support myself. I've got it almost working by copying the code used for unions, but I'm not getting the 'id' values and since I'm new to the typedoc code base, and node programming, I thought I'd ask for a bit of advice on the direction to take.
Here's the commit of what I've done so far
natevoci@2c0589e
I've been testing with this typescript file
The json output for the type of unionFooBar is
but for the IIntersectionFooBar type I get
as you can see the 'id' values are missing.
I'm guessing this is happening because this.reflection is not set in the ReferenceType class and the toObject() function has this
but I haven't been able to find where the ReferenceType constructor is being called to understand if the 3rd 'reflection' parameter of the constructor can be set.
Am I on the right track? Is what i'm trying to do even possible? Any advice or tips on what to look at next would be appreciated.
The text was updated successfully, but these errors were encountered: