Closed
Description
What package is the bug related to?
typedoc-plugin-markdown
Describe the issue
In certain scenarios, the type emitted for a function parameter that is a type is emitted as object
instead of the inline type.
A few notes:
- This is very similar to the issues mentioned in property emits
object
for its type instead of inlined typed #733 & Unioned type for function param emitsobject
instead of inline type for type that is based on atypedef
#720. - None of the issues occur when generating html (
typedoc-plugin-markdown
is not used) - There are three scenarios outlined in the repro:
- type based on typedef - all
doesNotWork*
functions emitobject
for theopts
param type - explicit type - No issues, everything works as expected
- explicit type with @inline tag - all
doesNotWork*
functions emitobject
for theopts
param type
- type based on typedef - all
- Adding
strict=true
to tsconfig.json changes the behavior:- type based on typedef -
doesNotWorkDefault
anddoesNotWork2
emit correctly butdoesNotWork1
does not - explicit type - No change, everything still works
- explicit type with @inline tag -
doesNotWorkDefault
anddoesNotWork2
emit correctly butdoesNotWork1
does not
- type based on typedef -
Repro: https://stackblitz.com/edit/vitejs-vite-cwwnqznq
npm run docs:md && npm run docs:html
TypeDoc configuration
"typedoc": "^0.27.5",
"typedoc-plugin-markdown": "^4.3.3",
"typescript": "^5.7.2",
Expected behavior
full type should emit inline in all cases for scenario 1 & 3.