Kind: Class
Source: atloria-monorepo/apps/database-parser/src/parsers/typeorm.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
TypeORMParserstops the work with an early return whenargs.length === 0, in 4 places.TypeORMParserstops the work with an early return whentext.startsWith('"') || text.startsWith("'"), in 2 places.TypeORMParserstops the work with an early return whennameMatch, in 2 places.TypeORMParserstops the work with an early return when!this.canParse(filePath).TypeORMParserstops the work with an early return whenarrowMatch.TypeORMParserstops the work with an early return when/^\w+$/.test(text).
When something fails
TypeORMParserhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?