Skip to content

chore: bulk update all jsdoc and jsdoctypes #2114

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 1, 2025

Conversation

SethFalco
Copy link
Member

@SethFalco SethFalco commented May 1, 2025

Does a bulk update on all JSDoc and JSDoc types. I've spent a lot of time looking at these since I was investigating a better way to approach exporting our types.

In many of my previous PRs, I'd be slowly amending some of the JSDocs anyway, but decided to do a bulk update now to normalize how we do JSDocs, which will reduce the noise in future PRs.

  • For functions, prefer the more verbose tags like @param and @returns, rather than @type. We use this version in some cases to document the function, and I personally prefer this syntax is it closer to what JSDoc intended rather than coupling too tightly the type checker.
  • When using @type on its own, use a single line.
  • Keep all @typedef directives at the top of the file under the import statements.
  • Fix minor grammar/casing issues in some JSDocs, I also formatted docs to utilize 80 columns.
  • Removes some instances where we import a @typedef but never use it.
  • In plugins/_collections.js, dropped the @see directive, as in retrospect I think it doesn't make sense to point the implementation to where it was exported.
  • In plugins/applyTransforms.js, deletes the two type aliases for PathData and Matrix as the types were being aliases to achieve what variables names already do.

This makes no changes to the implementation.

@SethFalco SethFalco force-pushed the bulk-update-jsdocs branch from df48f6c to 6677d0c Compare May 1, 2025 17:21
@SethFalco SethFalco merged commit 8c593fa into svg:main May 1, 2025
13 checks passed
@SethFalco SethFalco deleted the bulk-update-jsdocs branch May 1, 2025 21:16
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