@@ -2917,11 +2917,28 @@ module ts {
29172917 }
29182918 if ( symbolFlags & SymbolFlags . Import ) {
29192919 addNewLineIfDisplayPartsExist ( ) ;
2920- displayParts . push ( punctuationPart ( SyntaxKind . OpenParenToken ) ) ;
2921- displayParts . push ( textPart ( "alias" ) ) ;
2922- displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
2920+ displayParts . push ( keywordPart ( SyntaxKind . ImportKeyword ) ) ;
29232921 displayParts . push ( spacePart ( ) ) ;
29242922 addFullSymbolName ( symbol ) ;
2923+ displayParts . push ( spacePart ( ) ) ;
2924+ displayParts . push ( punctuationPart ( SyntaxKind . EqualsToken ) ) ;
2925+ displayParts . push ( spacePart ( ) ) ;
2926+ ts . forEach ( symbol . declarations , declaration => {
2927+ if ( declaration . kind === SyntaxKind . ImportDeclaration ) {
2928+ var importDeclaration = < ImportDeclaration > declaration ;
2929+ if ( importDeclaration . externalModuleName ) {
2930+ displayParts . push ( keywordPart ( SyntaxKind . RequireKeyword ) ) ;
2931+ displayParts . push ( punctuationPart ( SyntaxKind . OpenParenToken ) ) ;
2932+ displayParts . push ( displayPart ( getTextOfNode ( importDeclaration . externalModuleName ) , SymbolDisplayPartKind . stringLiteral ) ) ;
2933+ displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
2934+ }
2935+ else {
2936+ var internalAliasSymbol = typeResolver . getSymbolInfo ( importDeclaration . entityName ) ;
2937+ addFullSymbolName ( internalAliasSymbol , enclosingDeclaration ) ;
2938+ }
2939+ return true ;
2940+ }
2941+ } ) ;
29252942 }
29262943 if ( ! hasAddedSymbolInfo ) {
29272944 if ( symbolKind !== ScriptElementKind . unknown ) {
@@ -3028,7 +3045,7 @@ module ts {
30283045 case SyntaxKind . QualifiedName :
30293046 case SyntaxKind . ThisKeyword :
30303047 case SyntaxKind . SuperKeyword :
3031- // For the identifiers/this/usper etc get the type at position
3048+ // For the identifiers/this/super etc get the type at position
30323049 var type = typeInfoResolver . getTypeOfNode ( node ) ;
30333050 if ( type ) {
30343051 return {
0 commit comments