Repository navigation
Fix JSDoc node types - #65499
Open
Jake Bailey (jakebailey) wants to merge 1 commit into
Open
Fix JSDoc node types#65499Jake Bailey (jakebailey) wants to merge 1 commit into
Jake Bailey (jakebailey) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new tsExtends property is missing from the referenced schema’s node definition, so additionalProperties: false causes JSON Schema validation to reject it.
1 open issue
1 file not reviewed
tsc/internal/ast/ast_generated.go: Generated file
What changed in this PR
This PR aligns JSDoc AST types with parser output across the native compiler and TypeScript API.
Changes:
- Corrects JSDoc signature children to use tag types rather than declaration types.
- Adds
IdentifiertoModuleBodyfor qualified JSDoc names. - Updates generation support and adds API regression tests.
| File | Description |
|---|---|
tsc/internal/ast/ast_generated.go |
Updates generated JSDoc factory signatures and the ModuleBody comment. |
tools/scripts/tsc/schema.ts |
Adds public-base overrides and parenthesizes union array elements. |
tools/scripts/tsc/generate-ts-ast.ts |
Handles public-base overrides and parenthesized factory types. |
tools/scripts/tsc/ast.json |
Corrects JSDoc signature members and expands ModuleBody. |
packages/typescript/test/sync/ast.test.ts |
Tests JSDoc types, traversal, and cloning. |
packages/typescript/src/ast/visitor.generated.ts |
Validates signature return children as JSDoc return tags. |
packages/typescript/src/ast/is.generated.ts |
Recognizes identifiers as module bodies. |
packages/typescript/src/ast/factory.generated.ts |
Corrects JSDoc signature factory parameter types. |
packages/typescript/src/ast/ast.generated.ts |
Updates public JSDoc signature and module-body types. |
Review effort: Balanced
JSDoc signatures contain documentation tags rather than ordinary declaration children. Qualified JSDoc names also use namespace bodies that can end in an identifier. Describe these forms in the schema and generated public contracts. Keep native storage inheritance separate from public inheritance, and preserve union element types when generating readonly arrays.
Jake Bailey (jakebailey)
force-pushed
the
compiler-fixes/ast-schema-contracts
branch
from
November 14, 2026 05:03
7acd082 to
0a4f501
Compare
This branch has not been deployed
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.

These are all mistakes in the AST types.
ModuleBodyis the most spooky of them. But in fact,ModuleBodycould beIdentifierin Strada and was declared that way! So, I guess bring that back so the types are truthful.