Skip to content

AngularParser

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/apps/frontend-parser/src/parsers/angular.parser.ts

Implements: IParser

Methods

MethodSignatureReturns
initializeinitialize(config: ParserConfig)Promise<void>
canParsecanParse(filePath: string)boolean
parseFileparseFile(filePath: string, content: string)Promise<ParseResult>
parseFilesparseFiles(files: ParseFileInput[])Promise<ParseResult[]>
destroydestroy()Promise<void>

Properties

PropertyType
namestring
versionstring
supportedPatternsstring[]

Where it refuses work

  • AngularParser stops the work with Error when !this.project — “Parser not initialized. Call initialize() first.”.
  • AngularParser stops the work with an early return when !name, in 4 places.
  • AngularParser stops the work with an early return when !this.canParse(filePath).
  • AngularParser stops the work with an early return when !fileContent.trim().
  • AngularParser stops the work with an early return when jsDocs.length > 0.

When something fails

  • AngularParser handles failure in 1 place: it turns it into a return value in all 1.

Was this page helpful?

Download as PDF