@saflib/parser
@saflib/parser
Interfaces
| Interface | Description |
|---|---|
| DrizzleTableColumn | One column inside a drizzle table definition. |
| DrizzleTableEntry | One drizzle sqliteTable / pgTable / mysqlTable found by extractDrizzleTables. |
| ExportEntry | One exported symbol found by extractExports. |
| ImportEntry | One static import / re-export-from found by extractImports. |
| TestCaseEntry | One test case found by extractTestCases. |
| VueSfcSurface | - |
Type Aliases
| Type Alias | Description |
|---|---|
| ExportKind | Kind of a top-level export declaration. |
Functions
| Function | Description |
|---|---|
| extractDrizzleTables | Extract drizzle sqliteTable / pgTable / mysqlTable definitions from TypeScript source using the syntactic parser only (no type-checker). |
| extractExports | Extract exported symbols from TypeScript/JavaScript source using the syntactic parser only (ts.createSourceFile — no type-checker, no node_modules). |
| extractImports | Extract static import declarations from TypeScript/JavaScript source using the syntactic parser only (no type-checker). |
| extractLocalExportUsages | Export names that are referenced as values elsewhere in the same file (beyond their declaration). Used so same-file helpers aren't false dead-code (they get a self usedBy edge and are otherwise ignored). |
| extractTestCases | Extract describe / it / test cases from source using the syntactic parser only. Nested describe titles are joined onto the leaf title with " > ". |
| extractVueRootTag | First tag name in the SFC's root <template> block, skipping comments and whitespace. null when the template is empty or absent. |
| extractVueScript | Concatenate inner text of every <script> block (setup + optional extra). |
| extractVueSfc | Extract <script> text plus defineProps / defineEmits / defineModel members as prop / emit / model export entries (syntactic only). |
| isVueSfc | True when source looks like a Vue SFC (script + template, or <script setup>). Used by path-agnostic blob parsing where the filename is not available. |