use default type parameter rather than unknown when show quick help (#46792)

* use default type parameter rather than `unknown` when show quick help

* prefer default type parameter than constraint for quick info
This commit is contained in:
Song Gao
2021-12-09 09:02:22 +08:00
committed by GitHub
parent 921825585d
commit e2c89af335
2 changed files with 29 additions and 8 deletions

View File

@@ -30263,7 +30263,7 @@ namespace ts {
typeArguments.pop();
}
while (typeArguments.length < typeParameters.length) {
typeArguments.push(getConstraintOfTypeParameter(typeParameters[typeArguments.length]) || getDefaultTypeArgumentType(isJs));
typeArguments.push(getDefaultFromTypeParameter(typeParameters[typeArguments.length]) || getConstraintOfTypeParameter(typeParameters[typeArguments.length]) || getDefaultTypeArgumentType(isJs));
}
return typeArguments;
}