This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
Decorator output is inconsistent #250
Closed
Description
In this example, the decorator is not wrapped in a Decorator
node:
class Person {
@inject leftLeg: Leg;
}
==>
node.decorators = [ {type: 'Identifier'} ];
In this example, it is wrapped in a TSDecorator
node, instead of Decorator
node:
@dec enum E {}
==>
node.decorators = [ {type: 'TSDecorator', expression: {type: 'Identifier'}} ];
It would be nice if decorators arrays was always wrapped in a Decorator
node (without TS
prefix). This way it would work out of the box with babylon decorators.
I have a workaround in prettier, but I'd rather it be fixed inside of this project: prettier/prettier#1509