-
-
Notifications
You must be signed in to change notification settings - Fork 723
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
Destructured object default values are not being recognized. #2430
Comments
I don't think this is fixable without reaching into internal TS properties. Destructured objects are horrible to work with in the API, they're a close second to mixins in my opinion of the worst code to try to generate docs for... I always investigate these types of things with ts-ast-viewer -- https://ts-ast-viewer.com/#code/KYDwDg9gTgLgBAYwgOwM7wMIAtgINYBGEIcAvHABQDecAbgIYA2ArsADRwxSsBqTrZTt3ZwAZk1TA+LYIPGNJcAL4BKMgD44VJQG4AUEA If you click on ObjectBindingPattern, you'll get a (This is looking at it with source language set to TS, if you paste the original code in and set the language to JS, there's a similar story, but we do have a declaration... it's just pointing at the If you want to investigate this, I'd recommend setting up a TS project with only that function, and starting typedoc in a debugger, I recommend breakpoints in |
Ref: #2430 (non-fix, but makes some things nicer)
Search Terms
JSDoc, destrucutred object, function
Expected Behavior
Hello guys. I'm using the Typedoc API to generate a custom library documentation website. Apparently default values of destructured object parameters are not being recognized by Typedoc. Here is a brief of the component i'm extracting:
This is the only
SignatureReflection
for aCheckbox
component, where thedefaultValue
should be the pointed either in JSDoc or in the destructured object.Actual Behavior
None of JSDoc or in the destructured object is giving a default value, setting
DeclarationReflection.defaultValue
asundefined
.Steps to reproduce the bug
The bug is produced documenting in JSDoc and giving default values to destructured objects as parameters of a function.
Environment
Extra
Would be nice if i could solve it myself and do a pull request but i'm not sure where to dig in.
The text was updated successfully, but these errors were encountered: