typescriptExtractor.getVisibility (TS only — JS has no hook).
(&self, node: Node)
| 774 | |
| 775 | /// typescriptExtractor.getVisibility (TS only — JS has no hook). |
| 776 | fn visibility_of(&self, node: Node) -> Option<u8> { |
| 777 | if !self.variant.is_ts() { |
| 778 | return None; |
| 779 | } |
| 780 | for i in 0..node.child_count() { |
| 781 | let child = node.child(i)?; |
| 782 | if child.kind() == "accessibility_modifier" { |
| 783 | return match self.text(child) { |
| 784 | "public" => Some(1), |
| 785 | "private" => Some(2), |
| 786 | "protected" => Some(3), |
| 787 | _ => None, |
| 788 | }; |
| 789 | } |
| 790 | } |
| 791 | None |
| 792 | } |
| 793 | |
| 794 | /// isExported: walk the parent chain for an export_statement. |
| 795 | fn is_exported(&self, node: Node) -> bool { |
no test coverage detected