Add "decoratorsBeforeExport" option to @babel/generator (#7948)
* Add "decoratorsBeforeExport" option to @babel/generator * Docs
This commit is contained in:
@@ -2,8 +2,9 @@ import * as t from "@babel/types";
|
||||
|
||||
export function ClassDeclaration(node: Object, parent: Object) {
|
||||
if (
|
||||
!t.isExportDefaultDeclaration(parent) &&
|
||||
!t.isExportNamedDeclaration(parent)
|
||||
!this.format.decoratorsBeforeExport ||
|
||||
(!t.isExportDefaultDeclaration(parent) &&
|
||||
!t.isExportNamedDeclaration(parent))
|
||||
) {
|
||||
this.printJoin(node.decorators, node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user