-
Notifications
You must be signed in to change notification settings - Fork 179
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
parameter type emitted as object
instead of inline type
#745
Comments
thanks @techfg - i will go through each of these use-cases. |
thanks @tgreyuk! Very odd about why |
@techfg fixes for above in Tested against both |
Thanks for the update @tgreyuk! Unfortunately, it appears that some situations are still not working as expected.
Repro: https://stackblitz.com/edit/vitejs-vite-xdy13sac?file=src%2Findex.ts |
@techfg - sorry - not sure what happened with my testing there. I understand now though. When strict=false, the type is parsed as an OptionalType, which wasn't correctly handling the object expansion. However, when strict=true, the type is parsed as a UnionType that includes a null item which was being handled correctly. I do have a fix. I will plan to release a.s.a.p - probably tomorrow. |
No worries, thank you! And good to better understand why |
Hopefully resolved in |
all 3 scenarios look good in v4.4.1 regardless of Thank you @tgreyuk! |
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:
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.typedoc-plugin-markdown
is not used)doesNotWork*
functions emitobject
for theopts
param typedoesNotWork*
functions emitobject
for theopts
param typestrict=true
to tsconfig.json changes the behavior:doesNotWorkDefault
anddoesNotWork2
emit correctly butdoesNotWork1
does notdoesNotWorkDefault
anddoesNotWork2
emit correctly butdoesNotWork1
does notRepro: https://stackblitz.com/edit/vitejs-vite-cwwnqznq
npm run docs:md && npm run docs:html
TypeDoc configuration
Expected behavior
full type should emit inline in all cases for scenario 1 & 3.
The text was updated successfully, but these errors were encountered: