demo/typescript.js
function filterObjectMembersList(contextualMemberSymbols, existingMembers) {
                if (!existingMembers || existingMembers.length === 0) {
                    return contextualMemberSymbols;
                }
                var existingMemberNames = {};
                for (var _i = 0; _i < existingMembers.length; _i++) {
                    var m = existingMembers[_i];
                    // Ignore omitted expressions for missing members
                    if (m.kind !== 245 /* PropertyAssignment */ &&
                        m.kind !== 246 /* ShorthandPropertyAssignment */ &&
                        m.kind !== 163 /* BindingElement */) {
                        continue;
                    }
                    // If this is the current item we are editing right now, do not filter it out
                    if (m.getStart() <= position && position <= m.getEnd()) {
                        continue;
                    }
                    var existingName = void 0;
                    if (m.kind === 163 /* BindingElement */ && m.propertyName) {
                        existingName = m.propertyName.text;
                    }
                    else {
                        // TODO(jfreeman): Account for computed property name
                        // NOTE: if one only performs this step when m.name is an identifier,
                        // things like '__proto__' are not filtered out.
                        existingName = m.name.text;
                    }
                    existingMemberNames[existingName] = true;
                }
                return ts.filter(contextualMemberSymbols, function (m) { return !ts.lookUp(existingMemberNames, m.name); });
            }
function filterObjectMembersList(contextualMemberSymbols, existingMembers) {
                if (!existingMembers || existingMembers.length === 0) {
                    return contextualMemberSymbols;
                }
                var existingMemberNames = {};
                for (var _i = 0; _i < existingMembers.length; _i++) {
                    var m = existingMembers[_i];
                    // Ignore omitted expressions for missing members
                    if (m.kind !== 245 /* PropertyAssignment */ &&
                        m.kind !== 246 /* ShorthandPropertyAssignment */ &&
                        m.kind !== 163 /* BindingElement */) {
                        continue;
                    }
                    // If this is the current item we are editing right now, do not filter it out
                    if (m.getStart() <= position && position <= m.getEnd()) {
                        continue;
                    }
                    var existingName = void 0;
                    if (m.kind === 163 /* BindingElement */ && m.propertyName) {
                        existingName = m.propertyName.text;
                    }
                    else {
                        // TODO(jfreeman): Account for computed property name
                        // NOTE: if one only performs this step when m.name is an identifier,
                        // things like '__proto__' are not filtered out.
                        existingName = m.name.text;
                    }
                    existingMemberNames[existingName] = true;
                }
                return ts.filter(contextualMemberSymbols, function (m) { return !ts.lookUp(existingMemberNames, m.name); });
            }
Filters out completion suggestions for named imports or exports.

@returns Symbols to be suggested in an object binding pattern or object literal expression, barring those whose declarations
do not occur at the current position and have not otherwise been typed.