Skip to content

@saflib/parser


@saflib/parser

Interfaces

InterfaceDescription
DrizzleTableColumnOne column inside a drizzle table definition.
DrizzleTableEntryOne drizzle sqliteTable / pgTable / mysqlTable found by extractDrizzleTables.
ExportEntryOne exported symbol found by extractExports.
ImportEntryOne static import / re-export-from found by extractImports.
TestCaseEntryOne test case found by extractTestCases.
VueSfcSurface-

Type Aliases

Type AliasDescription
ExportKindKind of a top-level export declaration.

Functions

FunctionDescription
extractDrizzleTablesExtract drizzle sqliteTable / pgTable / mysqlTable definitions from TypeScript source using the syntactic parser only (no type-checker).
extractExportsExtract exported symbols from TypeScript/JavaScript source using the syntactic parser only (ts.createSourceFile — no type-checker, no node_modules).
extractImportsExtract static import declarations from TypeScript/JavaScript source using the syntactic parser only (no type-checker).
extractLocalExportUsagesExport 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).
extractTestCasesExtract describe / it / test cases from source using the syntactic parser only. Nested describe titles are joined onto the leaf title with " > ".
extractVueRootTagFirst tag name in the SFC's root <template> block, skipping comments and whitespace. null when the template is empty or absent.
extractVueScriptConcatenate inner text of every <script> block (setup + optional extra).
extractVueSfcExtract <script> text plus defineProps / defineEmits / defineModel members as prop / emit / model export entries (syntactic only).
isVueSfcTrue when source looks like a Vue SFC (script + template, or <script setup>). Used by path-agnostic blob parsing where the filename is not available.