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

Method is_exported

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

isExported: walk the parent chain for an export_statement, then ask whether a `declare module '…'` / `declare global` body exports it.

(&self, node: Node)

Source from the content-addressed store, hash-verified

1056 /// isExported: walk the parent chain for an export_statement, then ask
1057 /// whether a `declare module '…'` / `declare global` body exports it.
1058 fn is_exported(&self, node: Node) -> bool {
1059 let mut cur = node.parent();
1060 while let Some(p) = cur {
1061 if p.kind() == "export_statement" {
1062 return true;
1063 }
1064 cur = p.parent();
1065 }
1066 is_ambient_export(node)
1067 }
1068
1069 fn has_keyword_child(&self, node: Node, kw: &str) -> bool {
1070 for i in 0..node.child_count() {

Callers 6

extract_functionMethod · 0.45
extract_classMethod · 0.45
extract_interfaceMethod · 0.45
extract_enumMethod · 0.45
extract_variableMethod · 0.45
extract_type_aliasMethod · 0.45

Calls 1

is_ambient_exportFunction · 0.85

Tested by

no test coverage detected