fix(23716): show generic type in tagged template expression

This commit is contained in:
Alexander T
2020-05-26 18:56:53 +03:00
parent ff36bf00e4
commit 6e98431cec
2 changed files with 30 additions and 2 deletions

View File

@@ -159,14 +159,14 @@ namespace ts.SymbolDisplay {
}
// try get the call/construct signature from the type if it matches
let callExpressionLike: CallExpression | NewExpression | JsxOpeningLikeElement | undefined;
let callExpressionLike: CallExpression | NewExpression | JsxOpeningLikeElement | TaggedTemplateExpression | undefined;
if (isCallOrNewExpression(location)) {
callExpressionLike = location;
}
else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) {
callExpressionLike = <CallExpression | NewExpression>location.parent;
}
else if (location.parent && isJsxOpeningLikeElement(location.parent) && isFunctionLike(symbol.valueDeclaration)) {
else if (location.parent && (isJsxOpeningLikeElement(location.parent) || isTaggedTemplateExpression(location.parent)) && isFunctionLike(symbol.valueDeclaration)) {
callExpressionLike = location.parent;
}