File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2985,7 +2985,7 @@ namespace ts {
2985
2985
}
2986
2986
2987
2987
function tryGetGlobalSymbols ( ) : boolean {
2988
- let objectLikeContainer = getContainingObjectLiteralOrBindingPatternIfApplicableForCompletion ( contextToken ) ;
2988
+ let objectLikeContainer = tryGetObjectLikeCompletionContainer ( contextToken ) ;
2989
2989
if ( objectLikeContainer ) {
2990
2990
// Object literal expression, look up possible property names from contextual type
2991
2991
isMemberCompletion = true ;
@@ -3198,9 +3198,11 @@ namespace ts {
3198
3198
return false ;
3199
3199
}
3200
3200
3201
- function getContainingObjectLiteralOrBindingPatternIfApplicableForCompletion ( contextToken : Node ) : ObjectLiteralExpression | BindingPattern {
3202
- // The locations in an object literal expression that
3203
- // are applicable for completion are property name definition locations.
3201
+ /**
3202
+ * Returns the immediate owning object literal or binding pattern of a context token,
3203
+ * on the condition that one exists and that the context implies completion should be given.
3204
+ */
3205
+ function tryGetObjectLikeCompletionContainer ( contextToken : Node ) : ObjectLiteralExpression | BindingPattern {
3204
3206
if ( contextToken ) {
3205
3207
switch ( contextToken . kind ) {
3206
3208
case SyntaxKind . OpenBraceToken : // let x = { |
You can’t perform that action at this time.
0 commit comments