Skip to content

Commit e52a27b

Browse files
Renamed function.
1 parent 02e01d7 commit e52a27b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/services/services.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@ namespace ts {
29852985
}
29862986

29872987
function tryGetGlobalSymbols(): boolean {
2988-
let objectLikeContainer = getContainingObjectLiteralOrBindingPatternIfApplicableForCompletion(contextToken);
2988+
let objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken);
29892989
if (objectLikeContainer) {
29902990
// Object literal expression, look up possible property names from contextual type
29912991
isMemberCompletion = true;
@@ -3198,9 +3198,11 @@ namespace ts {
31983198
return false;
31993199
}
32003200

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 {
32043206
if (contextToken) {
32053207
switch (contextToken.kind) {
32063208
case SyntaxKind.OpenBraceToken: // let x = { |

0 commit comments

Comments
 (0)