typescriptExtractor.getVisibility (TS only — JS has no hook).
(&self, node: Node)
| 1036 | |
| 1037 | /// typescriptExtractor.getVisibility (TS only — JS has no hook). |
| 1038 | fn visibility_of(&self, node: Node) -> Option<u8> { |
| 1039 | if !self.variant.is_ts() { |
| 1040 | return None; |
| 1041 | } |
| 1042 | for i in 0..node.child_count() { |
| 1043 | let child = node.child(i)?; |
| 1044 | if child.kind() == "accessibility_modifier" { |
| 1045 | return match self.text(child) { |
| 1046 | "public" => Some(1), |
| 1047 | "private" => Some(2), |
| 1048 | "protected" => Some(3), |
| 1049 | _ => None, |
| 1050 | }; |
| 1051 | } |
| 1052 | } |
| 1053 | None |
| 1054 | } |
| 1055 | |
| 1056 | /// isExported: walk the parent chain for an export_statement, then ask |
| 1057 | /// whether a `declare module '…'` / `declare global` body exports it. |
no test coverage detected