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

Function has_export_declaration

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

1231/// hasExportDeclaration: a statement that exports by name or by assignment
1232/// (`export {…}`, `export =`, `export default x`), not by declaring.
1233fn has_export_declaration(block: Node) -> bool {
1234 for statement in block.named_children(&mut block.walk()) {
1235 if statement.kind() == "export_statement" && statement.child_by_field_name("declaration").is_none() {
1236 return true;
1237 }
1238 }
1239 false
1240}
1241
1242fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef {
1243 match s {

Callers 1

is_ambient_exportFunction · 0.85

Calls 1

walkMethod · 0.45

Tested by

no test coverage detected