MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / has_export_declaration

Function has_export_declaration

codegraph-kernel/src/tsjs/mod.rs:1248–1257  ·  view source on GitHub ↗

hasExportDeclaration: a statement that exports by name or by assignment (`export {…}`, `export =`, `export default x`), not by declaring.

(block: Node)

Source from the content-addressed store, hash-verified

1246/// hasExportDeclaration: a statement that exports by name or by assignment
1247/// (`export {…}`, `export =`, `export default x`), not by declaring.
1248fn has_export_declaration(block: Node) -> bool {
1249 for i in 0..block.named_child_count() {
1250 if let Some(statement) = block.named_child(i) {
1251 if statement.kind() == "export_statement" && statement.child_by_field_name("declaration").is_none() {
1252 return true;
1253 }
1254 }
1255 }
1256 false
1257}
1258
1259fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef {
1260 match s {

Callers 1

is_ambient_exportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected