Closed rash805115 closed 3 months ago
Yeah this isn't supported. I don't really maintain this much anymore, so it's not going to land unless someone contributes it.
No worries, I understand. I am trying to take a stab at it, but failing miserably since I don't know react all that much. This is what I have so far. If you can guide me, that would really increase my chances of making a PR.
I think the change needs to happen in MemberSignatureBody.tsx
<ul className="tsd-parameters">
{sig.parameters?.map((param) => (
<Fragment key={param.id}>
<li >
<h5>
<Flags flags={param.flags} />
{param.flags?.isRest && <span className="tsd-signature-symbol">...</span>}
{`${param.name}: `}
<Type type={param.type} />
<DefaultValue
comment={param.comment}
type={param.type}
value={param.defaultValue}
/>
</h5>
<Comment comment={param.comment} />
</li>
// After param is rendered, I want to add more children if the type is "union".
{(param.type as any).types.find((param2) => param2.type === 'reflection').declaration.children.map((param2) => (
<Fragment key={param2.id}>
<li >
<Flags flags={param2.flags} />
{param2.flags?.isRest && <span className="tsd-signature-symbol">...</span>}
{`${param2.name}: `}
<Type type={param2.type} />
<Comment comment={param2.comment} />
</li>
</Fragment>
))}
</Fragment>
))}
</ul>
which does render the values, but not sure how to make this more generic.
Also need to understand what to do with nested
. Since TypeDoc itself doesn't support it, just need to omit it out?
Lookin good. Should probably be a nested list so that it aligns correctly.
Thanks! Here is the PR https://github.com/milesj/docusaurus-plugin-typedoc-api/pull/148 to fix this issue. Let me know when/how can we release this.
Looks like this now,
Closing this, as the PR got merged. Thanks again.
The @param supports Object Literals and Destructed Parameters as detailed here. But neither of them are supported by this plugin I think. I do not see them being rendered as expected.
I tried this example,
and in the expected output, I only saw this plugin rendering the
options
param description.Here is what I see.
But I expected individual rendering for
options.value
as well. I understandoptions.nested.value
is not supported, which makes sense.PS: While I have the opportunity, a sincere thank you for making this plugin. This has saved me a ton of time.