property emits `object` for its type instead of inlined typed
Closed this issue · 3 comments
What package is the bug related to?
typedoc-plugin-markdown
Describe the issue
The generated markdown contains object
instead of the inlined type for properties of a type whose type is based on a typedef.
Repro: https://stackblitz.com/edit/vitejs-vite-xwhbv4ro
Steps to reproduce
- Open repro
npm run docs:md
- View
docs-md/interfaces/Foo.md
Actual Result
Additional Information
- The issue does not occur when generating html files (npm run docs:html)
- I attempted to isolate the issue without using
zod
, however I was unsuccessful despite several different ways of trying to achieve. It does not appear to be a zod problem since the html version emits as expected but apologies for not being able to narrow this down any further. - This seems similar to the
object
problem in #720
TypeDoc configuration
typedoc: 0.27.3
typedoc-plugin-markdown: 4.3.1
typescript: 5.7.2
Expected behavior
The types for Foo.c
and Foo.d
should be inlined.
Thank you.
Full inoine object is now represented inside type arguments (as per prop C). typedoc-plugin-markdown@4.3.2
.
Please note that where associated docs are included (as per prop D) then by default the keyword object
is set by default as otherwise it can create quite a lot of noise for large inline objects. However expandObjects=true
can be set to always display inline object type regardless if associated docs are included or not.
Hope that makes sense? This is perhaps not very obvious, so will review at some point, but hopefully this behaviour is acceptable for time being.
Thanks for the quick fix @tgreyuk, greatly appreciated!
Understood and makes sense on the decision to use object
when associated docs are included. As you mention, expandObjects
does provide ability to expand when needed, only drawback is that it's a global config vs. a type specific config.
Something to consider for future possibly is that I do think there is something to be said for having the default generated output as closely align with the default typedoc output (html format) except for in areas where it does not make any sense for markdown.
All that said, as of v4.3.2 this is working by design now, thank you again!
I will close this as fixed, but as noted will continue work with aligning with html theme when it makes sense to do so.