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

Method is_exported

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

1082 /// isExported: walk the parent chain for an export_statement, then ask
1083 /// whether a `declare module '…'` / `declare global` body exports it.
1084 fn is_exported(&self, node: Node) -> bool {
1085 let mut cur = node.parent();
1086 while let Some(p) = cur {
1087 if p.kind() == "export_statement" {
1088 return true;
1089 }
1090 cur = p.parent();
1091 }
1092 is_ambient_export(node)
1093 }
1094
1095 fn has_keyword_child(&self, node: Node, kw: &str) -> bool {
1096 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