demo/typescript.js
function tryGetObjectLikeCompletionContainer(contextToken) {
                if (contextToken) {
                    switch (contextToken.kind) {
                        case 15 /* OpenBraceToken */: // let x = { |
                        case 24 /* CommaToken */:
                            var parent_10 = contextToken.parent;
                            if (parent_10 && (parent_10.kind === 165 /* ObjectLiteralExpression */ || parent_10.kind === 161 /* ObjectBindingPattern */)) {
                                return parent_10;
                            }
                            break;
                    }
                }
                return undefined;
            }
function tryGetObjectLikeCompletionContainer(contextToken) {
                if (contextToken) {
                    switch (contextToken.kind) {
                        case 15 /* OpenBraceToken */: // let x = { |
                        case 24 /* CommaToken */:
                            var parent_10 = contextToken.parent;
                            if (parent_10 && (parent_10.kind === 165 /* ObjectLiteralExpression */ || parent_10.kind === 161 /* ObjectBindingPattern */)) {
                                return parent_10;
                            }
                            break;
                    }
                }
                return undefined;
            }
Returns the immediate owning object literal or binding pattern of a context token,
on the condition that one exists and that the context implies completion should be given.