typescriptExtractor.getSignature / javascriptExtractor.getSignature.
(&self, node: Node)
| 1047 | |
| 1048 | /// typescriptExtractor.getSignature / javascriptExtractor.getSignature. |
| 1049 | fn signature_of(&self, node: Node) -> Option<String> { |
| 1050 | let params = node.child_by_field_name("parameters")?; |
| 1051 | let mut sig = self.text(params).to_string(); |
| 1052 | if self.variant.is_ts() { |
| 1053 | if let Some(ret) = node.child_by_field_name("return_type") { |
| 1054 | let ret_text = self.text(ret); |
| 1055 | let stripped = ret_text.strip_prefix(':').unwrap_or(ret_text).trim_start(); |
| 1056 | sig.push_str(": "); |
| 1057 | sig.push_str(stripped); |
| 1058 | } |
| 1059 | } |
| 1060 | Some(sig) |
| 1061 | } |
| 1062 | |
| 1063 | /// typescriptExtractor.getVisibility (TS only — JS has no hook). |
| 1064 | fn visibility_of(&self, node: Node) -> Option<u8> { |
no test coverage detected