File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -20981,7 +20981,7 @@ namespace ts {
20981
20981
if (isJsxOpeningLikeElement(callTarget) && argIndex === 0) {
20982
20982
return getEffectiveFirstArgumentForJsxSignature(signature, callTarget);
20983
20983
}
20984
- if (contextFlags && contextFlags & ContextFlags.BaseConstraint && signature.target && !tryCast (callTarget, hasTypeArguments)?.typeArguments ) {
20984
+ if (contextFlags && contextFlags & ContextFlags.BaseConstraint && signature.target && !hasTypeArguments (callTarget) ) {
20985
20985
const baseSignature = getBaseSignature(signature.target);
20986
20986
return getTypeAtPosition(baseSignature, argIndex);
20987
20987
}
Original file line number Diff line number Diff line change @@ -7297,11 +7297,7 @@ namespace ts {
7297
7297
7298
7298
/** @internal */
7299
7299
export function hasTypeArguments ( node : Node ) : node is HasTypeArguments {
7300
- return node . kind === SyntaxKind . CallExpression
7301
- || node . kind === SyntaxKind . NewExpression
7302
- || node . kind === SyntaxKind . TaggedTemplateExpression
7303
- || node . kind === SyntaxKind . JsxOpeningElement
7304
- || node . kind === SyntaxKind . JsxSelfClosingElement ;
7300
+ return ! ! ( node as HasTypeArguments ) . typeArguments ;
7305
7301
}
7306
7302
7307
7303
/** True if has initializer node attached to it. */
You can’t perform that action at this time.
0 commit comments