[docs-infra] Fold only value exports into constant groups - #1812
Draft
Janpot wants to merge 2 commits into
Draft
Conversation
Blocked on michaldudak/typescript-api-extractor#226 being released: the code uses the isValue declaration-space flag that beta.4 does not report yet, so typecheck and the new tests stay red until the dependency is bumped. Type-only exports (literal type aliases, interfaces) no longer fold into the group or trip the constants-only error; they are typing helpers with no runtime constant to document. Standalone constants next to the file's enum now fail the build instead of silently vanishing from the docs, since downstream matching reads only the enum.
Deploy previewCheck out the code infra dashboard for more information about this PR. |
Single readConstantValue spelling shared by the predicate and the fold loop, identity-based sibling check against the found enum instead of a paired name comparison, and the ExportNode declaration spaces passed as the named object the extractor PR settled on instead of positional booleans.
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.
Follow-up to #1713, blocked on michaldudak/typescript-api-extractor#226 being released and the dependency bumped (currently beta.4; the bump also picks up the beta.5/6 breaking changes). Until then typecheck and the new tests are expected red — this PR is prepared as a workitem.
Uses the new
isValuedeclaration-space flag sotransformConstantGroupfolds only runtime constants: type-only exports (literal type aliases, interfaces) are skipped as typing helpers instead of being mistaken for constants or tripping the constants-only error, and standalone constants next to the file's enum now fail the build instead of silently vanishing from the generated docs.