Skip to content

update typing for StringifyOptions["lineWidth"] to match comment#17

Merged
eemeli merged 1 commit intoeemeli:mainfrom
robert-westenberger:fix-16-type-comment-mismatch-for-stringifyOptions-linewidth
May 13, 2025
Merged

update typing for StringifyOptions["lineWidth"] to match comment#17
eemeli merged 1 commit intoeemeli:mainfrom
robert-westenberger:fix-16-type-comment-mismatch-for-stringifyOptions-linewidth

Conversation

@robert-westenberger
Copy link
Copy Markdown
Contributor

Fixes #16

Copy link
Copy Markdown
Owner

@eemeli eemeli left a comment

Choose a reason for hiding this comment

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

Yup, that looks appropriate. The alternative would've been to change the comment to say something like "use 0 to disable", as that would work as well.

The 80 in 80 | number is indeed unnecessary, but also apparently ignored. I can't recall for sure, but there may have been some tooling around when I wrote this that showed the raw expression in autocompletion, where it'd hint at the default value.

Styling the comments as /** ... */ before each option instead of // ... would I think get them picked up by tools, which might be nice. The comment would also be a more appropriate place to indicate the default value. I'd be happy to review another PR making such a change... 😇

@eemeli eemeli merged commit e4e1ece into eemeli:main May 13, 2025
3 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.

type / comment mismatch for StringifyOptions["lineWidth"]

2 participants