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

fix: use name to sort method property #497

Merged
merged 1 commit into from Aug 31, 2021
Merged

Conversation

imdreamrunner
Copy link
Contributor

what was the issue?

if there is a comment (block/line) in front of the function property, the comment will affect the sorted order of items.

for example, a should be placed in front of b, but b got in front because it's ranked with "/"

      + expected - actual

       
               type FooType = {
      +          /* preserves block comment before a */
      +          a: number | string | boolean,
                 /* preserves block comment before b */
                 b(param: string): number,
      -          /* preserves block comment before a */
      -          a: number | string | boolean,
                 /* preserves block comment before c */
                 c: number,
               }

this PR fix the issue.

this fix potential wrong result due to comments.
@gajus gajus merged commit 4265b27 into gajus:master Aug 31, 2021
@gajus
Copy link
Owner

gajus commented Aug 31, 2021

🎉 This PR is included in version 5.9.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants