Skip to content

improve jsdoc conversion #1346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged

improve jsdoc conversion #1346

merged 1 commit into from
May 15, 2025

Conversation

Rich-Harris
Copy link
Member

this does two things — it ensures that we don't insert double newlines...

image

...and ensures that we do add a newline if either the current node or the preceding node spans multiple lines. In other words we can convert this

/** @type {Foo[]} */
let foo = [];

/** @type {Bar[]} */
let bar = [];

to this

let foo: Foo[] = [];
let bar: Bar[] = [];

but if either the foo or bar declaration spans multiple lines, we want to have a newline between them after the conversion.

@Rich-Harris Rich-Harris merged commit d827a71 into main May 15, 2025
4 checks passed
@Rich-Harris Rich-Harris deleted the improve-jsdoc-conversion branch May 15, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant