| 136725 | // If a reference is a class expression, the exported node would be its parent. |
| 136726 | // If a reference is a variable declaration, the exported node would be the variable statement. |
| 136727 | function getExportNode(parent, node) { |
| 136728 | var declaration = ts.isVariableDeclaration(parent) ? parent : ts.isBindingElement(parent) ? ts.walkUpBindingElementsAndPatterns(parent) : undefined; |
| 136729 | if (declaration) { |
| 136730 | return parent.name !== node ? undefined : |
| 136731 | ts.isCatchClause(declaration.parent) ? undefined : ts.isVariableStatement(declaration.parent.parent) ? declaration.parent.parent : undefined; |
| 136732 | } |
| 136733 | else { |
| 136734 | return parent; |
| 136735 | } |
| 136736 | } |
| 136737 | function isNodeImport(node) { |
| 136738 | var parent = node.parent; |
| 136739 | switch (parent.kind) { |