Skip to content

Commit df5a49f

Browse files
angrychowclaude
andauthored
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

15 files changed

+2222
-80
lines changed

ts-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "abcoder-ts-parser",
3-
"version": "0.0.13",
3+
"version": "0.0.21",
44
"description": "TypeScript AST parser for UNIAST specification",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

ts-parser/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const program = new Command();
1111
program
1212
.name('abcoder-ts-parser')
1313
.description('TypeScript AST parser for UNIAST specification')
14-
.version('0.0.13');
14+
.version('0.0.21');
1515

1616
program
1717
.command('parse')

0 commit comments

Comments
 (0)