File tree 1 file changed +10
-0
lines changed 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -4061,6 +4061,14 @@ module ts {
4061
4061
if ( referenceSymbol && isRelatableToSearchSet ( searchSymbols , referenceSymbol , referenceLocation ) ) {
4062
4062
result . push ( getReferenceEntryFromNode ( referenceLocation ) ) ;
4063
4063
}
4064
+ // TODO (yuisu): Comment
4065
+ else if ( referenceSymbol && referenceSymbol . declarations [ 0 ] . kind === SyntaxKind . ShortHandPropertyAssignment ) {
4066
+ var referenceSymbolDeclName = referenceSymbol . declarations [ 0 ] . name ;
4067
+ if ( searchSymbols . indexOf ( typeInfoResolver . resolveEntityNameForShortHandPropertyAssignment ( referenceSymbolDeclName ) ) >= 0 &&
4068
+ ! ( < SymbolLinks > referenceSymbol ) . target ) {
4069
+ result . push ( getReferenceEntryFromNode ( referenceSymbolDeclName ) ) ;
4070
+ }
4071
+ }
4064
4072
} ) ;
4065
4073
}
4066
4074
@@ -4227,6 +4235,8 @@ module ts {
4227
4235
forEach ( getPropertySymbolsFromContextualType ( location ) , contextualSymbol => {
4228
4236
result . push . apply ( result , typeInfoResolver . getRootSymbols ( contextualSymbol ) ) ;
4229
4237
} ) ;
4238
+
4239
+ // Add the symbol in the case of short-hand property assignment
4230
4240
if ( location . kind === SyntaxKind . Identifier && location . parent . kind === SyntaxKind . ShortHandPropertyAssignment ) {
4231
4241
result . push ( typeInfoResolver . resolveEntityNameForShortHandPropertyAssignment ( location ) ) ;
4232
4242
}
You can’t perform that action at this time.
0 commit comments