isExported: walk the parent chain for an export_statement, then ask whether a `declare module '…'` / `declare global` body exports it.
(&self, node: Node)
| 1188 | /// isExported: walk the parent chain for an export_statement, then ask |
| 1189 | /// whether a `declare module '…'` / `declare global` body exports it. |
| 1190 | fn is_exported(&self, node: Node) -> bool { |
| 1191 | let mut cur = node.parent(); |
| 1192 | while let Some(p) = cur { |
| 1193 | if p.kind() == "export_statement" { |
| 1194 | return true; |
| 1195 | } |
| 1196 | cur = p.parent(); |
| 1197 | } |
| 1198 | is_ambient_export(node) |
| 1199 | } |
| 1200 | |
| 1201 | fn has_keyword_child(&self, node: Node, kw: &str) -> bool { |
| 1202 | for c in node.children(&mut node.walk()) { |
no test coverage detected