@@ -2433,7 +2433,7 @@ module ts {
24332433 isMemberCompletion = true ;
24342434
24352435 if ( node . kind === SyntaxKind . Identifier || node . kind === SyntaxKind . QualifiedName || node . kind === SyntaxKind . PropertyAccessExpression ) {
2436- var symbol = typeInfoResolver . getSymbolInfo ( node ) ;
2436+ var symbol = typeInfoResolver . getSymbolAtLocation ( node ) ;
24372437
24382438 // This is an alias, follow what it aliases
24392439 if ( symbol && symbol . flags & SymbolFlags . Import ) {
@@ -2450,7 +2450,7 @@ module ts {
24502450 }
24512451 }
24522452
2453- var type = typeInfoResolver . getTypeOfNode ( node ) ;
2453+ var type = typeInfoResolver . getTypeAtLocation ( node ) ;
24542454 if ( type ) {
24552455 // Filter private properties
24562456 forEach ( type . getApparentProperties ( ) , symbol => {
@@ -2702,7 +2702,7 @@ module ts {
27022702 // which is permissible given that it is backwards compatible; but really we should consider
27032703 // passing the meaning for the node so that we don't report that a suggestion for a value is an interface.
27042704 // We COULD also just do what 'getSymbolModifiers' does, which is to use the first declaration.
2705- Debug . assert ( session . typeChecker . getNarrowedTypeOfSymbol ( symbol , location ) !== undefined , "Could not find type for symbol" ) ;
2705+ Debug . assert ( session . typeChecker . getTypeOfSymbolAtLocation ( symbol , location ) !== undefined , "Could not find type for symbol" ) ;
27062706 var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind ( symbol , getSourceFile ( filename ) , location , session . typeChecker , location , SemanticMeaning . All ) ;
27072707 return {
27082708 name : entryName ,
@@ -2805,7 +2805,7 @@ module ts {
28052805 if ( ! unionPropertyKind ) {
28062806 // If this was union of all methods,
28072807 //make sure it has call signatures before we can label it as method
2808- var typeOfUnionProperty = typeInfoResolver . getNarrowedTypeOfSymbol ( symbol , location ) ;
2808+ var typeOfUnionProperty = typeInfoResolver . getTypeOfSymbolAtLocation ( symbol , location ) ;
28092809 if ( typeOfUnionProperty . getCallSignatures ( ) . length ) {
28102810 return ScriptElementKind . memberFunctionElement ;
28112811 }
@@ -2882,7 +2882,7 @@ module ts {
28822882 symbolKind = ScriptElementKind . memberVariableElement ;
28832883 }
28842884
2885- var type = typeResolver . getNarrowedTypeOfSymbol ( symbol , location ) ;
2885+ var type = typeResolver . getTypeOfSymbolAtLocation ( symbol , location ) ;
28862886 if ( type ) {
28872887 if ( location . parent && location . parent . kind === SyntaxKind . PropertyAccessExpression ) {
28882888 var right = ( < PropertyAccessExpression > location . parent ) . name ;
@@ -3094,7 +3094,7 @@ module ts {
30943094 displayParts . push ( punctuationPart ( SyntaxKind . CloseParenToken ) ) ;
30953095 }
30963096 else {
3097- var internalAliasSymbol = typeResolver . getSymbolInfo ( importDeclaration . moduleReference ) ;
3097+ var internalAliasSymbol = typeResolver . getSymbolAtLocation ( importDeclaration . moduleReference ) ;
30983098 if ( internalAliasSymbol ) {
30993099 displayParts . push ( spacePart ( ) ) ;
31003100 displayParts . push ( operatorPart ( SyntaxKind . EqualsToken ) ) ;
@@ -3204,7 +3204,7 @@ module ts {
32043204 return undefined ;
32053205 }
32063206
3207- var symbol = typeInfoResolver . getSymbolInfo ( node ) ;
3207+ var symbol = typeInfoResolver . getSymbolAtLocation ( node ) ;
32083208 if ( ! symbol ) {
32093209 // Try getting just type at this position and show
32103210 switch ( node . kind ) {
@@ -3214,7 +3214,7 @@ module ts {
32143214 case SyntaxKind . ThisKeyword :
32153215 case SyntaxKind . SuperKeyword :
32163216 // For the identifiers/this/super etc get the type at position
3217- var type = typeInfoResolver . getTypeOfNode ( node ) ;
3217+ var type = typeInfoResolver . getTypeAtLocation ( node ) ;
32183218 if ( type ) {
32193219 return {
32203220 kind : ScriptElementKind . unknown ,
@@ -3331,7 +3331,7 @@ module ts {
33313331 return undefined ;
33323332 }
33333333
3334- var symbol = typeInfoResolver . getSymbolInfo ( node ) ;
3334+ var symbol = typeInfoResolver . getSymbolAtLocation ( node ) ;
33353335
33363336 // Could not find a symbol e.g. node is string or number keyword,
33373337 // or the symbol was an internal symbol and does not have a declaration e.g. undefined symbol
@@ -3963,7 +3963,7 @@ module ts {
39633963 return getReferencesForSuperKeyword ( node ) ;
39643964 }
39653965
3966- var symbol = typeInfoResolver . getSymbolInfo ( node ) ;
3966+ var symbol = typeInfoResolver . getSymbolAtLocation ( node ) ;
39673967
39683968 // Could not find a symbol e.g. unknown identifier
39693969 if ( ! symbol ) {
@@ -4215,7 +4215,7 @@ module ts {
42154215 return ;
42164216 }
42174217
4218- var referenceSymbol = typeInfoResolver . getSymbolInfo ( referenceLocation ) ;
4218+ var referenceSymbol = typeInfoResolver . getSymbolAtLocation ( referenceLocation ) ;
42194219 if ( referenceSymbol ) {
42204220 var referenceSymbolDeclaration = referenceSymbol . valueDeclaration ;
42214221 var shorthandValueSymbol = typeInfoResolver . getShorthandAssignmentValueSymbol ( referenceSymbolDeclaration ) ;
@@ -4457,7 +4457,7 @@ module ts {
44574457
44584458 function getPropertySymbolFromTypeReference ( typeReference : TypeReferenceNode ) {
44594459 if ( typeReference ) {
4460- var type = typeInfoResolver . getTypeOfNode ( typeReference ) ;
4460+ var type = typeInfoResolver . getTypeAtLocation ( typeReference ) ;
44614461 if ( type ) {
44624462 var propertySymbol = typeInfoResolver . getPropertyOfType ( type , propertyName ) ;
44634463 if ( propertySymbol ) {
@@ -4981,7 +4981,7 @@ module ts {
49814981 // Only walk into nodes that intersect the requested span.
49824982 if ( node && span . intersectsWith ( node . getStart ( ) , node . getWidth ( ) ) ) {
49834983 if ( node . kind === SyntaxKind . Identifier && node . getWidth ( ) > 0 ) {
4984- var symbol = typeInfoResolver . getSymbolInfo ( node ) ;
4984+ var symbol = typeInfoResolver . getSymbolAtLocation ( node ) ;
49854985 if ( symbol ) {
49864986 var type = classifySymbol ( symbol , getMeaningFromLocation ( node ) ) ;
49874987 if ( type ) {
@@ -5397,7 +5397,7 @@ module ts {
53975397
53985398 // Can only rename an identifier.
53995399 if ( node && node . kind === SyntaxKind . Identifier ) {
5400- var symbol = typeInfoResolver . getSymbolInfo ( node ) ;
5400+ var symbol = typeInfoResolver . getSymbolAtLocation ( node ) ;
54015401
54025402 // Only allow a symbol to be renamed if it actually has at least one declaration.
54035403 if ( symbol && symbol . getDeclarations ( ) && symbol . getDeclarations ( ) . length > 0 ) {
0 commit comments