typescriptExtractor.getVisibility (TS only — JS has no hook).
(&self, node: Node)
| 1168 | |
| 1169 | /// typescriptExtractor.getVisibility (TS only — JS has no hook). |
| 1170 | fn visibility_of(&self, node: Node) -> Option<u8> { |
| 1171 | if !self.variant.is_ts() { |
| 1172 | return None; |
| 1173 | } |
| 1174 | for i in 0..node.child_count() { |
| 1175 | let child = node.child(i)?; |
| 1176 | if child.kind() == "accessibility_modifier" { |
| 1177 | return match self.text(child) { |
| 1178 | "public" => Some(1), |
| 1179 | "private" => Some(2), |
| 1180 | "protected" => Some(3), |
| 1181 | _ => None, |
| 1182 | }; |
| 1183 | } |
| 1184 | } |
| 1185 | None |
| 1186 | } |
| 1187 | |
| 1188 | /// isExported: walk the parent chain for an export_statement, then ask |
| 1189 | /// whether a `declare module '…'` / `declare global` body exports it. |
no test coverage detected