Treat functions with @type tags on parameters as typed in JS files (#61177)

This commit is contained in:
Mateusz Burzyński
2025-04-14 15:35:20 -07:00
committed by GitHub
parent 83dc0bb2ed
commit eef7c14ef1
4 changed files with 108 additions and 0 deletions
+1
View File
@@ -15507,6 +15507,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
isInJSFile(declaration) &&
isValueSignatureDeclaration(declaration) &&
!hasJSDocParameterTags(declaration) &&
!some(declaration.parameters, p => !!getJSDocType(p)) &&
!getJSDocType(declaration) &&
!getContextualSignatureForFunctionLikeDeclaration(declaration);
if (isUntypedSignatureInJSFile) {