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

Function has_export_declaration

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

1220/// hasExportDeclaration: a statement that exports by name or by assignment
1221/// (`export {…}`, `export =`, `export default x`), not by declaring.
1222fn has_export_declaration(block: Node) -> bool {
1223 for i in 0..block.named_child_count() {
1224 if let Some(statement) = block.named_child(i) {
1225 if statement.kind() == "export_statement" && statement.child_by_field_name("declaration").is_none() {
1226 return true;
1227 }
1228 }
1229 }
1230 false
1231}
1232
1233fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef {
1234 match s {

Callers 1

is_ambient_exportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected