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

Function has_export_declaration

codegraph-kernel/src/tsjs/mod.rs:1347–1354  ·  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

1345/// hasExportDeclaration: a statement that exports by name or by assignment
1346/// (`export {…}`, `export =`, `export default x`), not by declaring.
1347fn has_export_declaration(block: Node) -> bool {
1348 for statement in block.named_children(&mut block.walk()) {
1349 if statement.kind() == "export_statement" && statement.child_by_field_name("declaration").is_none() {
1350 return true;
1351 }
1352 }
1353 false
1354}
1355
1356fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef {
1357 match s {

Callers 1

is_ambient_exportFunction · 0.85

Calls 1

walkMethod · 0.45

Tested by

no test coverage detected