Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 520 Bytes

File metadata and controls

31 lines (26 loc) · 520 Bytes

Allow multiple decorators on same getter/setter (#14584 by @fisker)

// Input
class A {
  @decorator()
  get foo () {}
  
  @decorator()
  set foo (value) {}
}

// Prettier stable
SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3)
  3 |   get foo () {}
  4 |   
> 5 |   @decorator()
    |   ^^^^^^^^^^^^
  6 |   set foo (value) {}
  7 | }

// Prettier main
class A {
  @decorator()
  get foo() {}

  @decorator()
  set foo(value) {}
}