Create a new TypeScript extractor
()
| 24 | impl TypeScriptExtractor { |
| 25 | /// Create a new TypeScript extractor |
| 26 | pub fn new() -> Self { |
| 27 | let mut parser = Parser::new(); |
| 28 | parser |
| 29 | .set_language(&tree_sitter_typescript::LANGUAGE_TYPESCRIPT.into()) |
| 30 | .expect("Failed to load TypeScript grammar"); |
| 31 | Self { parser } |
| 32 | } |
| 33 | |
| 34 | /// Create a new TSX extractor (TypeScript with JSX) |
| 35 | pub fn new_tsx() -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected