refactor: use isPropertyAccessExpression
This commit is contained in:
		| @@ -7,7 +7,8 @@ import { | |||||||
| 	ClassDeclaration, | 	ClassDeclaration, | ||||||
| 	SyntaxKind, | 	SyntaxKind, | ||||||
| 	CallExpression, | 	CallExpression, | ||||||
| 	PropertyAccessExpression | 	PropertyAccessExpression, | ||||||
|  | 	isPropertyAccessExpression | ||||||
| } from 'typescript'; | } from 'typescript'; | ||||||
|  |  | ||||||
| import { ParserInterface } from './parser.interface'; | import { ParserInterface } from './parser.interface'; | ||||||
| @@ -114,7 +115,7 @@ export class ServiceParser extends AbstractAstParser implements ParserInterface | |||||||
| 				} | 				} | ||||||
|  |  | ||||||
| 				const propAccess = callNode.getChildAt(0).getChildAt(0) as PropertyAccessExpression; | 				const propAccess = callNode.getChildAt(0).getChildAt(0) as PropertyAccessExpression; | ||||||
| 				if (!propAccess || propAccess.kind !== SyntaxKind.PropertyAccessExpression) { | 				if (!propAccess || !isPropertyAccessExpression(propAccess)) { | ||||||
| 					return false; | 					return false; | ||||||
| 				} | 				} | ||||||
| 				if (!propAccess.getFirstToken() || propAccess.getFirstToken().kind !== SyntaxKind.ThisKeyword) { | 				if (!propAccess.getFirstToken() || propAccess.getFirstToken().kind !== SyntaxKind.ThisKeyword) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user