Skip to content

Conversation

sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Jul 11, 2021

Description

Fixes #11098

Since TSMappedType contains { and }, it could not be implemented as a simple leading comments.

Checklist

  • I’ve added tests to confirm my change works.
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@sosukesuzuki sosukesuzuki requested review from fisker and thorn0 July 11, 2021 06:04
@fisker
Copy link
Member

fisker commented Aug 30, 2021

I'm not sure if we want to do this, the current output seems more preferred for me.

Prettier pr-11190
Playground link

--parser babel

Input:

class A {
  static // comment
  foo() {}
  
  get // comment
  foo() {}
  
   // comment
  static
  foo() {}
  
  // comment
  get 
  foo() {}
  
}

Output:

class A {
  static // comment
  foo() {}

  get // comment
  foo() {}

  // comment
  static foo() {}

  // comment
  get foo() {}
}

@thorn0
Copy link
Member

thorn0 commented Sep 7, 2022

superseded by #13427

@thorn0 thorn0 closed this Sep 7, 2022
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.

Comment gets wrongly placed after readonly keyword in mapped type
3 participants