Skip to content
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

feat: Support more leading comment types #2482

Merged
merged 8 commits into from
Feb 14, 2024

Conversation

inferrinizzard
Copy link
Contributor

@inferrinizzard inferrinizzard commented Jan 27, 2024

Fixes #2332

Summary

Updates comment types and allows leadingComments to support multiple comment types, adds emitComments method in ConvenienceRenderer

Changes

  • Added types for different styles of comments (inline, description block, custom)
  • Updated leadingComments references to use new type
  • Updated all leadingComments logic in all relevant languages
  • Added emitComments method in ConvenienceRenderer to handle different comment styles
  • Updated emitCommentLines method to take object as param instead of list args
  • Added lineEnd param to emitCommentLines
  • renamed beforeLine to beforeComment and afterLine to afterComment

This change is backwards-compatible for all external/standard use cases as it preserves the existing string[] type for leadingComments but it will break custom renderers that call emitCommentLines directly

Copy link
Member

@dvdsgl dvdsgl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Thank you.

@dvdsgl dvdsgl merged commit c188aba into glideapps:master Feb 14, 2024
24 checks passed
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.

TS/JS Leading Comments do not support multiline/jsdoc
2 participants