(path: any, printPath: any)
| 2562 | } |
| 2563 | |
| 2564 | function printDecorators(path: any, printPath: any) { |
| 2565 | const parts: any[] = []; |
| 2566 | const node = path.getValue(); |
| 2567 | |
| 2568 | if ( |
| 2569 | node.decorators && |
| 2570 | node.decorators.length > 0 && |
| 2571 | // If the parent node is an export declaration, it will be |
| 2572 | // responsible for printing node.decorators. |
| 2573 | !util.getParentExportDeclaration(path) |
| 2574 | ) { |
| 2575 | path.each(function (decoratorPath: any) { |
| 2576 | parts.push(printPath(decoratorPath), "\n"); |
| 2577 | }, "decorators"); |
| 2578 | } else if ( |
| 2579 | util.isExportDeclaration(node) && |
| 2580 | node.declaration && |
| 2581 | node.declaration.decorators |
| 2582 | ) { |
| 2583 | // Export declarations are responsible for printing any decorators |
| 2584 | // that logically apply to node.declaration. |
| 2585 | path.each( |
| 2586 | function (decoratorPath: any) { |
| 2587 | parts.push(printPath(decoratorPath), "\n"); |
| 2588 | }, |
| 2589 | "declaration", |
| 2590 | "decorators", |
| 2591 | ); |
| 2592 | } |
| 2593 | |
| 2594 | return concat(parts); |
| 2595 | } |
| 2596 | |
| 2597 | function printStatementSequence(path: any, options: any, print: any) { |
| 2598 | const filtered: any[] = []; |
no test coverage detected
searching dependent graphs…