@@ -6645,7 +6645,7 @@ namespace ts {
6645
6645
// Starting with the parent of the symbol's declaration, check if the mapper maps any of
6646
6646
// the type parameters introduced by enclosing declarations. We just pick the first
6647
6647
// declaration since multiple declarations will all have the same parent anyway.
6648
- let node = symbol.declarations[0].parent ;
6648
+ let node: Node = symbol.declarations[0];
6649
6649
while (node) {
6650
6650
switch (node.kind) {
6651
6651
case SyntaxKind.FunctionType:
@@ -6665,7 +6665,7 @@ namespace ts {
6665
6665
case SyntaxKind.ClassExpression:
6666
6666
case SyntaxKind.InterfaceDeclaration:
6667
6667
case SyntaxKind.TypeAliasDeclaration:
6668
- const declaration = <DeclarationWithTypeParameters> node;
6668
+ const declaration = node as DeclarationWithTypeParameters ;
6669
6669
if (declaration.typeParameters) {
6670
6670
for (const d of declaration.typeParameters) {
6671
6671
if (contains(mappedTypes, getDeclaredTypeOfTypeParameter(getSymbolOfNode(d)))) {
@@ -6680,6 +6680,14 @@ namespace ts {
6680
6680
}
6681
6681
}
6682
6682
break;
6683
+ case SyntaxKind.JSDocFunctionType:
6684
+ const func = node as JSDocFunctionType;
6685
+ for (const p of func.parameters) {
6686
+ if (contains(mappedTypes, getTypeOfNode(p))) {
6687
+ return true;
6688
+ }
6689
+ }
6690
+ break;
6683
6691
case SyntaxKind.ModuleDeclaration:
6684
6692
case SyntaxKind.SourceFile:
6685
6693
return false;
0 commit comments