Commit df5a49f
fix: self-reference detection and type alias dependency extraction (#123)
* fix: use variable symbol instead of arrow function symbol for default export check
Fixed an issue where arrow function default export detection was checking
the arrow function's symbol instead of the variable declaration's symbol.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* upd version
* fix: correct type alias symbol extraction from TypeReference nodes
Fixed type dependency recognition for type aliases (especially union types) across all parsers by extracting symbols from TypeReference node's typeName child instead of the node itself.
Changes:
- DependencyUtils: capture union/intersection type aliases before recursing into members
- TypeParser: extract symbols from typeName for TypeReference nodes, handle ExpressionWithTypeArguments, put type alias dependencies in InlineStruct instead of Implements
- FunctionParser: extract symbols from TypeReference typeName for function parameter/return types
- VarParser: extract symbols from TypeReference typeName for variable/property type annotations
- Added comprehensive unit tests for all three parsers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* fix type self-reference problem
* filtering type parameters
* support class parsing
---------
Co-authored-by: Claude <[email protected]>1 parent 79484dc commit df5a49f
File tree
15 files changed
+2222
-80
lines changed- ts-parser
- src
- parser
- test
- utils
- test-repo/src
- middleware
15 files changed
+2222
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments