@@ -2851,41 +2851,41 @@ module ts {
2851
2851
if ( symbolFlags & SymbolFlags . Class && ! hasAddedSymbolInfo ) {
2852
2852
displayParts . push ( keywordPart ( SyntaxKind . ClassKeyword ) ) ;
2853
2853
displayParts . push ( spacePart ( ) ) ;
2854
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) ) ;
2854
+ addFullSymbolName ( symbol ) ;
2855
2855
writeTypeParametersOfSymbol ( symbol , sourceFile ) ;
2856
2856
}
2857
2857
if ( symbolFlags & SymbolFlags . Interface ) {
2858
2858
addNewLineIfDisplayPartsExist ( ) ;
2859
2859
displayParts . push ( keywordPart ( SyntaxKind . InterfaceKeyword ) ) ;
2860
2860
displayParts . push ( spacePart ( ) ) ;
2861
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) ) ;
2861
+ addFullSymbolName ( symbol ) ;
2862
2862
writeTypeParametersOfSymbol ( symbol , sourceFile ) ;
2863
2863
}
2864
2864
if ( symbolFlags & SymbolFlags . Enum ) {
2865
2865
addNewLineIfDisplayPartsExist ( ) ;
2866
2866
displayParts . push ( keywordPart ( SyntaxKind . EnumKeyword ) ) ;
2867
2867
displayParts . push ( spacePart ( ) ) ;
2868
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile ) ) ;
2868
+ addFullSymbolName ( symbol ) ;
2869
2869
}
2870
2870
if ( symbolFlags & SymbolFlags . Module ) {
2871
2871
addNewLineIfDisplayPartsExist ( ) ;
2872
2872
displayParts . push ( keywordPart ( SyntaxKind . ModuleKeyword ) ) ;
2873
2873
displayParts . push ( spacePart ( ) ) ;
2874
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile ) ) ;
2874
+ addFullSymbolName ( symbol ) ;
2875
2875
}
2876
2876
if ( symbolFlags & SymbolFlags . TypeParameter ) {
2877
2877
addNewLineIfDisplayPartsExist ( ) ;
2878
2878
displayParts . push ( punctuationPart ( SyntaxKind . OpenParenToken ) ) ;
2879
2879
displayParts . push ( textPart ( "type parameter" ) ) ;
2880
2880
displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
2881
2881
displayParts . push ( spacePart ( ) ) ;
2882
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , enclosingDeclaration ) ) ;
2882
+ addFullSymbolName ( symbol ) ;
2883
2883
displayParts . push ( spacePart ( ) ) ;
2884
2884
displayParts . push ( keywordPart ( SyntaxKind . InKeyword ) ) ;
2885
2885
displayParts . push ( spacePart ( ) ) ;
2886
2886
if ( symbol . parent ) {
2887
2887
// Class/Interface type parameter
2888
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol . parent , enclosingDeclaration , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) )
2888
+ addFullSymbolName ( symbol . parent , enclosingDeclaration ) ;
2889
2889
writeTypeParametersOfSymbol ( symbol . parent , enclosingDeclaration ) ;
2890
2890
}
2891
2891
else {
@@ -2897,7 +2897,7 @@ module ts {
2897
2897
displayParts . push ( spacePart ( ) ) ;
2898
2898
}
2899
2899
else if ( signatureDeclaration . kind !== SyntaxKind . CallSignature && signatureDeclaration . name ) {
2900
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , signatureDeclaration . symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) )
2900
+ addFullSymbolName ( signatureDeclaration . symbol ) ;
2901
2901
}
2902
2902
displayParts . push . apply ( displayParts , signatureToDisplayParts ( typeResolver , signature , sourceFile , TypeFormatFlags . WriteTypeArgumentsOfSignature ) ) ;
2903
2903
}
@@ -2921,7 +2921,7 @@ module ts {
2921
2921
displayParts . push ( textPart ( "alias" ) ) ;
2922
2922
displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
2923
2923
displayParts . push ( spacePart ( ) ) ;
2924
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile ) ) ;
2924
+ addFullSymbolName ( symbol ) ;
2925
2925
}
2926
2926
if ( ! hasAddedSymbolInfo ) {
2927
2927
if ( symbolKind !== ScriptElementKind . unknown ) {
@@ -2969,15 +2969,20 @@ module ts {
2969
2969
}
2970
2970
}
2971
2971
2972
+ function addFullSymbolName ( symbol : Symbol , enclosingDeclaration ?: Node ) {
2973
+ var fullSymbolDisplayParts = symbolToDisplayParts ( typeResolver , symbol , enclosingDeclaration || sourceFile , /*meaning*/ undefined ,
2974
+ SymbolFormatFlags . WriteTypeParametersOrArguments | SymbolFormatFlags . UseOnlyExternalAliasing ) ;
2975
+ displayParts . push . apply ( displayParts , fullSymbolDisplayParts ) ;
2976
+ }
2977
+
2972
2978
function addPrefixForAnyFunctionOrVar ( symbol : Symbol , symbolKind : string ) {
2973
2979
addNewLineIfDisplayPartsExist ( ) ;
2974
2980
if ( symbolKind ) {
2975
2981
displayParts . push ( punctuationPart ( SyntaxKind . OpenParenToken ) ) ;
2976
2982
displayParts . push ( textPart ( symbolKind ) ) ;
2977
2983
displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
2978
2984
displayParts . push ( spacePart ( ) ) ;
2979
- // Write type parameters of class/Interface if it is property/method of the generic class/interface
2980
- displayParts . push . apply ( displayParts , symbolToDisplayParts ( typeResolver , symbol , sourceFile , /*meaning*/ undefined , SymbolFormatFlags . WriteTypeParametersOrArguments ) ) ;
2985
+ addFullSymbolName ( symbol ) ;
2981
2986
}
2982
2987
}
2983
2988
0 commit comments