mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-21 08:25:43 -05:00
Fix error message for class type in JSDoc missing type arguments (#27222)
This commit is contained in:
@@ -8158,7 +8158,7 @@ namespace ts {
|
||||
const isJs = isInJSFile(node);
|
||||
const isJsImplicitAny = !noImplicitAny && isJs;
|
||||
if (!isJsImplicitAny && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) {
|
||||
const missingAugmentsTag = isJs && node.parent.kind !== SyntaxKind.JSDocAugmentsTag;
|
||||
const missingAugmentsTag = isJs && isExpressionWithTypeArguments(node) && !isJSDocAugmentsTag(node.parent);
|
||||
const diag = minTypeArgumentCount === typeParameters.length
|
||||
? missingAugmentsTag
|
||||
? Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag
|
||||
|
||||
Reference in New Issue
Block a user