Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 506 Bytes

pr-7482.md

File metadata and controls

31 lines (26 loc) · 506 Bytes

Add support for decorators (#7482 by @fisker)

// Input
/* @flow */
@decorator4
class Foo {
  @decorator1
  method1() {}

  @decorator2
  @decorator3
  method2() {}
}

// Prettier stable
SyntaxError: Unexpected token `@`, expected the token `class` (2:1)

// Prettier master
/* @flow */
@decorator4
class Foo {
  @decorator1
  method1() {}

  @decorator2
  @decorator3
  method2() {}
}