Kind: Class
Source: atloria-monorepo/libs/parser-core/src/parsers/backend/typescript-symbol.parser.ts
Implements: IParser
Methods
| Method | Signature | Returns |
|---|---|---|
initialize | initialize(_config: ParserConfig) | Promise<void> |
canParse | canParse(filePath: string) | boolean |
parseFile | parseFile(filePath: string, content: string) | Promise<ParseResult> |
parseFiles | parseFiles(files: ParseFileInput[]) | Promise<ParseResult[]> |
destroy | destroy() | Promise<void> |
Properties
| Property | Type |
|---|---|
name | any |
version | any |
supportedPatterns | any |
Where it refuses work
TypeScriptSymbolParserstops the work with an early return when!/\.(tsx?|mjs|cjs|js)$/.test(filePath).TypeScriptSymbolParserstops the work with an early return when/\.(d|spec|test|stories)\.(tsx?|mjs|cjs|js)$/.test(filePath).TypeScriptSymbolParserstops the work with an early return when/\.min\.js$/.test(filePath).TypeScriptSymbolParserstops the work with an early return when/(^|\/)(__tests__|__mocks__|node_modules|dist|build|coverage|vendor)\//.test(filePath).TypeScriptSymbolParserstops the work with an early return when!fileContent.trim().TypeScriptSymbolParserstops the work with an early return when!this.isExported(stmt) && !cjsEligible.
When something fails
TypeScriptSymbolParserhandles failure in 2 places: it logs it and continues in 1, and turns it into a return value in 1.
Was this page helpful?