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
feat: richer symbol metadata — generics, return types, enum members
Signatures now include generic type parameters (`<T extends Base>`),
return type annotations (`: Promise<void>`), and class/interface
heritage (`extends`, `implements`). Enum members are extracted into a
new `members TEXT` column as JSON.
Benchmarked on a 1,653-file React/TS codebase: 973 functions gain
return types, 873 symbols gain generics, 291 enum member values
captured across 50 enums. Index time +7% (negligible), DB size
unchanged.
| file_path | TEXT FK | References `files(path)` ON DELETE CASCADE |
180
+
| name | TEXT | Symbol name |
181
+
| kind | TEXT |`function`, `const`, `class`, `interface`, `type`, `enum`|
182
+
| line_start | INTEGER | Start line (1-based) |
183
+
| line_end | INTEGER | End line |
184
+
| signature | TEXT | Reconstructed signature with generics and return types (e.g. `identity<T>(val): T`, `interface Repo<T> extends Iterable<T>`, `class Store<T> extends Base<T> implements IStore<T>`) |
185
+
| is_exported | INTEGER | 1 if exported |
186
+
| is_default_export | INTEGER | 1 if default export |
187
+
| members | TEXT | JSON array of enum members (NULL for non-enums). Each entry: `{"name":"…","value":"…"}` (value omitted for implicit-value enums) |
187
188
188
189
### `imports` — Import statements (`STRICT`)
189
190
@@ -283,7 +284,8 @@ All tables have covering indexes tuned for AI agent query patterns. See [Coverin
283
284
284
285
Uses the Rust-based `oxc-parser` via NAPI bindings to parse TypeScript/TSX/JS/JSX files into an AST. Extracts:
285
286
286
-
-**Symbols**: Functions, arrow functions, classes, interfaces, type aliases, enums — with reconstructed signatures
287
+
-**Symbols**: Functions, arrow functions, classes, interfaces, type aliases, enums — with reconstructed signatures including generic type parameters (e.g. `<T extends Base>`), return type annotations (e.g. `: Promise<void>`), class/interface heritage (`extends`, `implements`)
288
+
-**Enum members**: String and numeric values for each member, stored as JSON (e.g. `[{"name":"Active","value":"active"}]`)
287
289
-**Imports**: All `import` statements with specifiers, source paths, and type-only flags
288
290
-**Exports**: Named exports, default exports, re-exports
289
291
-**Components**: React components detected via PascalCase name + (JSX return **or** hook usage). A PascalCase function in `.tsx`/`.jsx` that neither returns JSX nor calls hooks is indexed only as a symbol, not a component. Extracts props type and hooks used
0 commit comments