Skip to content

Commit 5c239fa

Browse files
author
Andy
authored
Remove redundant handler for JSDocComment in checkSourceElement (microsoft#18771)
1 parent 70087ed commit 5c239fa

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/compiler/checker.ts

+2-12
Original file line numberDiff line numberDiff line change
@@ -19789,14 +19789,6 @@ namespace ts {
1978919789
}
1979019790
}
1979119791

19792-
function checkJSDocComment(node: JSDoc) {
19793-
if ((node as JSDoc).tags) {
19794-
for (const tag of (node as JSDoc).tags) {
19795-
checkSourceElement(tag);
19796-
}
19797-
}
19798-
}
19799-
1980019792
function checkFunctionOrMethodDeclaration(node: FunctionDeclaration | MethodDeclaration): void {
1980119793
checkDecorators(node);
1980219794
checkSignatureDeclaration(node);
@@ -22432,8 +22424,8 @@ namespace ts {
2243222424
}
2243322425

2243422426
if (isInJavaScriptFile(node) && (node as JSDocContainer).jsDoc) {
22435-
for (const jsdoc of (node as JSDocContainer).jsDoc) {
22436-
checkJSDocComment(jsdoc);
22427+
for (const { tags } of (node as JSDocContainer).jsDoc) {
22428+
forEach(tags, checkSourceElement);
2243722429
}
2243822430
}
2243922431

@@ -22493,8 +22485,6 @@ namespace ts {
2249322485
return checkSourceElement((<ParenthesizedTypeNode | TypeOperatorNode>node).type);
2249422486
case SyntaxKind.JSDocTypedefTag:
2249522487
return checkJSDocTypedefTag(node as JSDocTypedefTag);
22496-
case SyntaxKind.JSDocComment:
22497-
return checkJSDocComment(node as JSDoc);
2249822488
case SyntaxKind.JSDocParameterTag:
2249922489
return checkSourceElement((node as JSDocParameterTag).typeExpression);
2250022490
case SyntaxKind.JSDocFunctionType:

0 commit comments

Comments
 (0)