diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 18232280730..d89247b70f9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -19789,14 +19789,6 @@ namespace ts { } } - function checkJSDocComment(node: JSDoc) { - if ((node as JSDoc).tags) { - for (const tag of (node as JSDoc).tags) { - checkSourceElement(tag); - } - } - } - function checkFunctionOrMethodDeclaration(node: FunctionDeclaration | MethodDeclaration): void { checkDecorators(node); checkSignatureDeclaration(node); @@ -22432,8 +22424,8 @@ namespace ts { } if (isInJavaScriptFile(node) && (node as JSDocContainer).jsDoc) { - for (const jsdoc of (node as JSDocContainer).jsDoc) { - checkJSDocComment(jsdoc); + for (const { tags } of (node as JSDocContainer).jsDoc) { + forEach(tags, checkSourceElement); } } @@ -22493,8 +22485,6 @@ namespace ts { return checkSourceElement((node).type); case SyntaxKind.JSDocTypedefTag: return checkJSDocTypedefTag(node as JSDocTypedefTag); - case SyntaxKind.JSDocComment: - return checkJSDocComment(node as JSDoc); case SyntaxKind.JSDocParameterTag: return checkSourceElement((node as JSDocParameterTag).typeExpression); case SyntaxKind.JSDocFunctionType: