@@ -4965,7 +4965,8 @@ namespace ts {
4965
4965
// Compute the meaning from the location and the symbol it references
4966
4966
let searchMeaning = getIntersectingMeaningFromDeclarations ( getMeaningFromLocation ( node ) , declarations ) ;
4967
4967
4968
- // Get the text to search for, we need to normalize it as external module names will have quotes
4968
+ // Get the text to search for.
4969
+ // Note: if this is an external module symbol, the name doesn't include quotes.
4969
4970
let declaredName = getDeclaredName ( typeChecker , symbol , node ) ;
4970
4971
4971
4972
// Try to get the smallest valid scope that we can limit our search to;
@@ -5019,7 +5020,7 @@ namespace ts {
5019
5020
} ) ;
5020
5021
}
5021
5022
5022
- function getInternedName ( symbol : Symbol , location : Node , declarations : Declaration [ ] ) {
5023
+ function getInternedName ( symbol : Symbol , location : Node , declarations : Declaration [ ] ) : string {
5023
5024
// If this is an export or import specifier it could have been renamed using the 'as' syntax.
5024
5025
// If so we want to search for whatever under the cursor.
5025
5026
if ( isImportOrExportSpecifierName ( location ) ) {
@@ -5036,8 +5037,10 @@ namespace ts {
5036
5037
5037
5038
/**
5038
5039
* Determines the smallest scope in which a symbol may have named references.
5040
+ * Note that not every construct has been accounted for. This function can
5041
+ * probably be improved.
5039
5042
*
5040
- * Returns undefined if the scope cannot be determined, often implying that
5043
+ * @returns undefined if the scope cannot be determined, implying that
5041
5044
* a reference to a symbol can occur anywhere.
5042
5045
*/
5043
5046
function getSymbolScope ( symbol : Symbol ) : Node {
0 commit comments