fix(63726): fix declaration emit for multiline jsdoc literal types - #4839
Open
Oleksandr Tarasiuk (a-tarasyuk) wants to merge 1 commit into
Open
fix(63726): fix declaration emit for multiline jsdoc literal types#4839Oleksandr Tarasiuk (a-tarasyuk) wants to merge 1 commit into
Oleksandr Tarasiuk (a-tarasyuk) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds a regression test and adjusts scanner trivia-skipping to correctly preserve multiline JSDoc literal union types during declaration emit (fixes TypeScript issue #63726).
Changes:
- Added a new compiler test case for multiline JSDoc union literal typedefs in JS files.
- Updated the reference baseline to validate correct
.d.tsoutput and preserved JSDoc formatting. - Adjusted
GetTextOfNodeFromSourceTextto use JSDoc-aware trivia skipping when extracting text from JSDoc nodes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| testdata/tests/cases/compiler/jsdocMultilineUnion.ts | New regression test covering multiline JSDoc literal union typedef formatting. |
| testdata/baselines/reference/compiler/jsdocMultilineUnion.js | Baseline validating correct declaration emit and preserved multiline JSDoc formatting. |
| internal/scanner/utilities.go | Uses JSDoc-aware trivia skipping when extracting node text for JSDoc nodes. |
Oleksandr Tarasiuk (a-tarasyuk)
force-pushed
the
fix/63726
branch
from
August 6, 2026 18:49
073e322 to
0ad87d1
Compare
Copilot started reviewing on behalf of
Oleksandr Tarasiuk (a-tarasyuk)
August 6, 2026 22:27
View session
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 microsoft/TypeScript#63726