@@ -94,6 +94,7 @@ namespace ts {
94
94
getExportSpecifierLocalTargetSymbol,
95
95
getTypeAtLocation: getTypeOfNode,
96
96
getPropertySymbolOfDestructuringAssignment,
97
+ signatureToString,
97
98
typeToString,
98
99
getSymbolDisplayBuilder,
99
100
symbolToString,
@@ -2674,6 +2675,11 @@ namespace ts {
2674
2675
}
2675
2676
2676
2677
function buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, symbolStack?: Symbol[]) {
2678
+ const returnType = getReturnTypeOfSignature(signature);
2679
+ if (flags & TypeFormatFlags.supressAnyReturnType && isTypeAny(returnType)) {
2680
+ return;
2681
+ }
2682
+
2677
2683
if (flags & TypeFormatFlags.WriteArrowStyleSignature) {
2678
2684
writeSpace(writer);
2679
2685
writePunctuation(writer, SyntaxKind.EqualsGreaterThanToken);
@@ -2687,7 +2693,6 @@ namespace ts {
2687
2693
buildTypePredicateDisplay(signature.typePredicate, writer, enclosingDeclaration, flags, symbolStack);
2688
2694
}
2689
2695
else {
2690
- const returnType = getReturnTypeOfSignature(signature);
2691
2696
buildTypeDisplay(returnType, writer, enclosingDeclaration, flags, symbolStack);
2692
2697
}
2693
2698
}
@@ -4136,7 +4141,7 @@ namespace ts {
4136
4141
return <InterfaceTypeWithDeclaredMembers>type;
4137
4142
}
4138
4143
4139
- function getTypeWithThisArgument(type: Type, thisArgument?: Type) {
4144
+ function getTypeWithThisArgument(type: Type, thisArgument?: Type): Type {
4140
4145
if (getObjectFlags(type) & ObjectFlags.Reference) {
4141
4146
return createTypeReference((<TypeReference>type).target,
4142
4147
concatenate((<TypeReference>type).typeArguments, [thisArgument || (<TypeReference>type).target.thisType]));
0 commit comments