Closed
Conversation
avivkeller
requested changes
Mar 22, 2026
Member
avivkeller
left a comment
There was a problem hiding this comment.
Right now, doc-kit only supports types and generics.
Most of these changes will not be supported by doc-kit, and thus cannot land.
However, either:
- doc-kit support for these types should be added
- rewrite these types as generics
Author
There was a problem hiding this comment.
@avivkeller
Thanks for the context on doc-kit...... That makes sense.
I just pushed an update following your advice:
Stripped out all the unsupported AST types to keep things safe.
Re, wrote tuples into Tuple<...> generics so doc-kit can natively render them.
Reverted the
generate md.mjs
change entirely to keep the PR focused.
Let me know if this version is good to go for the pipeline!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #30 by correcting how
resolve()
in
plugins/theme/partials/types.mjs
handles the TypeDoc AST. The previous implementation collapsed TypeScript semantics (e.g., stripping generic arguments, converting tuples to unions).
The updated resolver properly maps the AST to preserve syntax:
Generics: Preserves typeArguments.
Tuples: Renders bracket notation [A, B] instead of unions.
Conditionals: Preserves the T extends U ? X : Y structure.
Reflections: Attempts call-signature and property-bag rendering.
Edge cases: Adds explicit handling for predicate, rest, named-tuple-member, and query.
Additionally, this adds a structural guard to
generate-md.mjs
to warn developers if the sibling ./webpack checkout is missing, avoiding a cryptic stack trace.
What kind of change does this PR introduce?
Fix
Did you add tests for your changes?
N/A - The markdown generation logic currently lacks an automated test suite. Output was manually verified against webpack.d.ts to ensure complex types (like fileTimestamps and Record<K,V>) render correctly.
Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
N/A
Use of AI
I used an LLM strictly as a search tool to reference specific TypeDoc AST property names for edge cases and better understand flows, as a huge spectrum of the project, . The actual AST traversal logic, implementation, and type mapping were written manually..