Extract the declaration signature (text from start up to the opening `{`).
(state: &ExtractionState, node: TsNode<'_>)
| 992 | |
| 993 | /// Extract the declaration signature (text from start up to the opening `{`). |
| 994 | fn extract_declaration_signature(state: &ExtractionState, node: TsNode<'_>) -> String { |
| 995 | let text = state.node_text(node); |
| 996 | if let Some(brace_pos) = text.find('{') { |
| 997 | text[..brace_pos].trim().to_string() |
| 998 | } else { |
| 999 | // For declarations without a body (e.g., abstract methods ending with `;`). |
| 1000 | text.trim_end_matches(';').trim().to_string() |
| 1001 | } |
| 1002 | } |
| 1003 | |
| 1004 | /// Extract Java-style doc comments (/** ... */) preceding a declaration. |
| 1005 | fn extract_java_docstring(state: &ExtractionState, node: TsNode<'_>) -> Option<String> { |