typescriptExtractor.getVisibility (TS only — JS has no hook).
(&self, node: Node)
| 1054 | |
| 1055 | /// typescriptExtractor.getVisibility (TS only — JS has no hook). |
| 1056 | fn visibility_of(&self, node: Node) -> Option<u8> { |
| 1057 | if !self.variant.is_ts() { |
| 1058 | return None; |
| 1059 | } |
| 1060 | for i in 0..node.child_count() { |
| 1061 | let child = node.child(i)?; |
| 1062 | if child.kind() == "accessibility_modifier" { |
| 1063 | return match self.text(child) { |
| 1064 | "public" => Some(1), |
| 1065 | "private" => Some(2), |
| 1066 | "protected" => Some(3), |
| 1067 | _ => None, |
| 1068 | }; |
| 1069 | } |
| 1070 | } |
| 1071 | None |
| 1072 | } |
| 1073 | |
| 1074 | /// isExported: walk the parent chain for an export_statement, then ask |
| 1075 | /// whether a `declare module '…'` / `declare global` body exports it. |
no test coverage detected