[GSOC 2026] - fix(theme): correctly render intersection types with '&' instead of '|' separator#61
Closed
soumyarajbag wants to merge 1 commit intowebpack:mainfrom
Closed
Conversation
|
|
8834ff4 to
9330066
Compare
Member
|
It's set up as it is correctly intentionally. Please actually understand the code base before sending PRs. |
Author
|
Hey @avivkeller - then is there any other issue - I may be able to contribute and I am interested to submit proposal as a GSOC 2026 Contributor so if you could provide some issues if opened. |
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.
Fixes for #7
Summary
The
resolvefunction inplugins/theme/partials/types.mjshandledunionandintersectiontypes in the samecaseblock, causing intersection types to be renderedwith
|(the union separator) instead of&.This means any TypeScript intersection type like
A & Bwas being incorrectly documentedas
A|B, making it indistinguishable from a union typeA | B.Concrete examples from the generated output:
cleverMergeinutilreturnsT | O | (T & O)— rendered as{T|O|T|O}instead of{T|O|T&O}schemaparameter type is(JSONSchema4 & ExtendedSchema) | (JSONSchema6 & ExtendedSchema) | ...— rendered as{JSONSchema4|ExtendedSchema|JSONSchema6|ExtendedSchema|...}instead of{JSONSchema4&ExtendedSchema|JSONSchema6&ExtendedSchema|...}What kind of change does this PR introduce?
fix
Did you add tests for your changes?
No tests were added. The fix is verified by regenerating the docs (
npm run generate-docs) and confirming the output inpages/v5.x/now correctly uses&forintersection types.
Does this PR introduce a breaking change?
No. This corrects the rendered Markdown output to accurately reflect the actual
TypeScript types. The generated pages in
pages/v5.x/are updated accordingly.If relevant, what needs to be documented once your changes are merged or what have you
already documented?
No documentation changes needed. The fix itself corrects the generated documentation
output.
Use of AI
Claude (claude-sonnet-4-6) was used to assist with identifying the bug by auditing the
generated Markdown output against the original TypeScript type definitions in
webpack/types.d.ts. The fix itself (splitting theunion/intersectioncase block)was reviewed and understood before being applied.