MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / exported_ts

Function exported_ts

atomic-audit/src/extract/languages.rs:711–728  ·  view source on GitHub ↗
(mut node: Node<'_>, source: &str)

Source from the content-addressed store, hash-verified

709}
710
711fn exported_ts(mut node: Node<'_>, source: &str) -> bool {
712 loop {
713 if modifier(node, source, "private")
714 || node
715 .child_by_field_name("name")
716 .is_some_and(|name| text(name, source).starts_with('#'))
717 {
718 return false;
719 }
720 if node.kind() == "export_statement" {
721 return true;
722 }
723 let Some(parent) = node.parent() else {
724 return false;
725 };
726 node = parent;
727 }
728}
729
730fn names(node: Node<'_>, source: &str) -> Vec<String> {
731 if matches!(node.kind(), "import_statement" | "import_from_statement") {

Callers 1

public_surfaceFunction · 0.85

Calls 4

modifierFunction · 0.85
parentMethod · 0.80
textFunction · 0.70
kindMethod · 0.45

Tested by

no test coverage detected