isExported: walk the parent chain for an export_statement, then ask whether a `declare module '…'` / `declare global` body exports it.
(&self, node: Node)
| 1074 | /// isExported: walk the parent chain for an export_statement, then ask |
| 1075 | /// whether a `declare module '…'` / `declare global` body exports it. |
| 1076 | fn is_exported(&self, node: Node) -> bool { |
| 1077 | let mut cur = node.parent(); |
| 1078 | while let Some(p) = cur { |
| 1079 | if p.kind() == "export_statement" { |
| 1080 | return true; |
| 1081 | } |
| 1082 | cur = p.parent(); |
| 1083 | } |
| 1084 | is_ambient_export(node) |
| 1085 | } |
| 1086 | |
| 1087 | fn has_keyword_child(&self, node: Node, kw: &str) -> bool { |
| 1088 | for c in node.children(&mut node.walk()) { |
no test coverage detected