Kind: Class
Source: atloria-monorepo/libs/parser-core/src/parsers/backend/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!/\.(controller|service|module|guard|interceptor|pipe|middleware|gateway|resolver)\.ts$/.….NestjsParserstops the work with an early return when/\.(controller|guard|interceptor|middleware|gateway|resolver)\.ts$/.test(filePath).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]).
When something fails
NestjsParserhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?