@@ -665,7 +665,7 @@ module ts {
665
665
kind : this . kind ,
666
666
kindModifiers : this . kindModifiers ,
667
667
textSpan : this . textSpan ,
668
- displayParts : this . displayParts . forEach ( d => {
668
+ displayParts : this . displayParts . map ( d => {
669
669
return {
670
670
text : d . text ,
671
671
kind : SymbolDisplayPartKind [ d . kind ]
@@ -2255,11 +2255,33 @@ module ts {
2255
2255
return undefined ;
2256
2256
}
2257
2257
2258
+ var totalParts : SymbolDisplayPart [ ] = [ ] ;
2259
+ if ( symbol . flags & SymbolFlags . Class ) {
2260
+ totalParts . push ( { text : "class" , kind : SymbolDisplayPartKind . keyword , symbol : undefined } ) ;
2261
+ }
2262
+ else if ( symbol . flags & SymbolFlags . Interface ) {
2263
+ totalParts . push ( { text : "interface" , kind : SymbolDisplayPartKind . keyword , symbol : undefined } ) ;
2264
+ }
2265
+ else if ( symbol . flags & SymbolFlags . Enum ) {
2266
+ totalParts . push ( { text : "enum" , kind : SymbolDisplayPartKind . keyword , symbol : undefined } ) ;
2267
+ }
2268
+ else if ( symbol . flags & SymbolFlags . Module ) {
2269
+ totalParts . push ( { text : "module" , kind : SymbolDisplayPartKind . keyword , symbol : undefined } ) ;
2270
+ }
2271
+
2272
+ totalParts . push ( { text : " " , kind : SymbolDisplayPartKind . space , symbol : undefined } ) ;
2273
+ totalParts . push . apply ( totalParts , typeInfoResolver . symbolToDisplayParts ( symbol , getContainerNode ( node ) ) ) ;
2274
+
2275
+ var type = typeInfoResolver . getTypeOfSymbol ( symbol ) ;
2276
+ if ( type ) {
2277
+ totalParts . push . apply ( totalParts , typeInfoResolver . typeToDisplayParts ( type ) ) ;
2278
+ }
2279
+
2258
2280
return new QuickInfo (
2259
2281
getSymbolKind ( symbol ) ,
2260
2282
getSymbolModifiers ( symbol ) ,
2261
2283
new TypeScript . TextSpan ( node . getStart ( ) , node . getWidth ( ) ) ,
2262
- typeInfoResolver . symbolToDisplayParts ( symbol ) ) ;
2284
+ totalParts ) ;
2263
2285
}
2264
2286
2265
2287
function getTypeAtPosition ( fileName : string , position : number ) : TypeInfo {
0 commit comments