(sourceFile, decl, name, changes, useEs6Exports)
| 162637 | } |
| 162638 | } |
| 162639 | function addExportToChanges(sourceFile, decl, name, changes, useEs6Exports) { |
| 162640 | if (isExported(sourceFile, decl, useEs6Exports, name)) |
| 162641 | return; |
| 162642 | if (useEs6Exports) { |
| 162643 | if (!ts.isExpressionStatement(decl)) |
| 162644 | changes.insertExportModifier(sourceFile, decl); |
| 162645 | } |
| 162646 | else { |
| 162647 | var names = getNamesToExportInCommonJS(decl); |
| 162648 | if (names.length !== 0) |
| 162649 | changes.insertNodesAfter(sourceFile, decl, names.map(createExportAssignment)); |
| 162650 | } |
| 162651 | } |
| 162652 | function isExported(sourceFile, decl, useEs6Exports, name) { |
| 162653 | var _a; |
| 162654 | if (useEs6Exports) { |
no test coverage detected