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