Kind: Class
Source: atloria-monorepo/apps/backend-parser/src/parsers/nestjs.parser.ts
NestJS Parser implementation
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
NestjsParserstops the work with an early return when!ts.isCallExpression(decorator.expression), in 2 places.NestjsParserstops the work with an early return when!fileContent.trim().NestjsParserstops the work with an early return when!httpMethod.NestjsParserstops the work with an early return whenargs.length === 0 || !ts.isObjectLiteralExpression(args[0]).NestjsParserstops the work with an early return when!ts.isPropertyAssignment(prop) || !ts.isIdentifier(prop.name).NestjsParserstops the work with an early return when!(key in result).
When something fails
NestjsParserhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?