Skip to content

Commit e8f8ef9

Browse files
committed
Use hasTypeArguments in getTypeArgumentConstraint
1 parent d5bbf02 commit e8f8ef9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ import {
420420
hasSyntacticModifier,
421421
hasSyntacticModifiers,
422422
hasType,
423+
hasTypeArguments,
423424
HeritageClause,
424425
hostGetCanonicalFileName,
425426
Identifier,
@@ -42705,10 +42706,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4270542706

4270642707
function getTypeArgumentConstraint(node: TypeNode): Type | undefined {
4270742708
let typeArgumentPosition;
42708-
if (
42709-
"typeArguments" in node.parent && // eslint-disable-line local/no-in-operator
42710-
Array.isArray(node.parent.typeArguments)
42711-
) {
42709+
if (hasTypeArguments(node.parent) && Array.isArray(node.parent.typeArguments)) {
4271242710
typeArgumentPosition = node.parent.typeArguments.indexOf(node);
4271342711
}
4271442712

0 commit comments

Comments
 (0)