We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
hasTypeArguments
getTypeArgumentConstraint
1 parent d5bbf02 commit e8f8ef9Copy full SHA for e8f8ef9
1 file changed
src/compiler/checker.ts
@@ -420,6 +420,7 @@ import {
420
hasSyntacticModifier,
421
hasSyntacticModifiers,
422
hasType,
423
+ hasTypeArguments,
424
HeritageClause,
425
hostGetCanonicalFileName,
426
Identifier,
@@ -42705,10 +42706,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
42705
42706
42707
function getTypeArgumentConstraint(node: TypeNode): Type | undefined {
42708
let typeArgumentPosition;
- if (
42709
- "typeArguments" in node.parent && // eslint-disable-line local/no-in-operator
42710
- Array.isArray(node.parent.typeArguments)
42711
- ) {
+ if (hasTypeArguments(node.parent) && Array.isArray(node.parent.typeArguments)) {
42712
typeArgumentPosition = node.parent.typeArguments.indexOf(node);
42713
}
42714
0 commit comments