You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TS/TSX: function declarations nested inside another function emit no node, so their call edges dangle #2653
A function declaration nested inside another function body produces no node. Only top-level declarations are emitted. Any call made from inside such a function then has a source id that no node carries, so the edge is discarded at build time and counts as dangling.
Expected — a node for handleClick(), contained by Panel(), with a calls edge to doThing().
Why it matters
React components keep their event handlers as nested function declarations, so this removes the entire intra-component call graph. In one real component (ProductOutputPanel.tsx, 724 lines) none of its five handlers — handleRegenDe, handleRegenEn, handleRegen, handleContentSlotApply, handleSave — is emitted; the file yields 16 nodes and the only function-like ones are two top-level hooks.
The consequence is not just missing nodes. The extraction still emits the edge
whose source id matches no node, so it is silently dropped and reported as a dangling endpoint. The relationship survives only at file granularity, and "which handler calls this helper" is unanswerable.
Checked for duplicates
#1740 covers calls inside anonymous arrow callbacks (addEventListener, forEach); #2575 covers await import() inside a nested function; #2040 covers nested class containment; #1322 covers function symbols assigned via this.X = / exports.X = / class arrow fields. This one is a plain named function declaration nested in a function body, where the symbol itself is never created.
Activity
fix(js): extract nested function declarations (#2653)
feat(js): extend nested-function extraction to arrow components/callb…
chore: bump to 0.9.43
chore: bump to 0.9.44
safishamsi commentedon Aug 15, 2026
Fixed in v0.9.44 (on PyPI now) via #2705, thanks @hopstreax. Closing.
fix(extract): Task 03 二轮评审 3 Important(模块注释 docstring + JS 嵌套函数 JSDoc…