getSignature (scala.ts:110-117) — first-match-wins fields: curried defs keep only the first list; a type_parameters node carrying field `parameters` wins over the value list.
(&self, node: Node<'t>)
| 436 | /// defs keep only the first list; a type_parameters node carrying field |
| 437 | /// `parameters` wins over the value list. |
| 438 | fn signature_of(&self, node: Node<'t>) -> Option<String> { |
| 439 | let params = node.child_by_field_name("parameters"); |
| 440 | let ret = node.child_by_field_name("return_type"); |
| 441 | if params.is_none() && ret.is_none() { |
| 442 | return None; |
| 443 | } |
| 444 | let mut sig = params.map(|p| self.text(p).to_string()).unwrap_or_default(); |
| 445 | if let Some(r) = ret { |
| 446 | sig.push_str(": "); |
| 447 | sig.push_str(self.text(r)); |
| 448 | } |
| 449 | if sig.is_empty() { |
| 450 | None |
| 451 | } else { |
| 452 | Some(sig) |
| 453 | } |
| 454 | } |
| 455 | |
| 456 | /// extractScalaReturnType (scala.ts:56-67). |
| 457 | fn return_type_of(&self, node: Node<'t>) -> Option<String> { |
no test coverage detected