update/plugins/org.eclipse.wildwebdeveloper_0.5.8.202005190736/node_modules/@angular/language-service/src/diagnostics.js
/**
     * Return elements filtered by unique span.
     * @param elements
     */
Return elements filtered by unique span.
@param elements
Return elements filtered by unique span . @param elements
function uniqueBySpan(elements) {
        var e_5, _a;
        var result = [];
        var map = new Map();
        try {
            for (var elements_1 = tslib_1.__values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) {
                var element = elements_1_1.value;
                var span = element.span;
                var set = map.get(span.start);
                if (!set) {
                    set = new Set();
                    map.set(span.start, set);
                }
                if (!set.has(span.end)) {
                    set.add(span.end);
                    result.push(element);
                }
            }
        }
        catch (e_5_1) { e_5 = { error: e_5_1 }; }
        finally {
            try {
                if (elements_1_1 && !elements_1_1.done && (_a = elements_1.return)) _a.call(elements_1);
            }
            finally { if (e_5) throw e_5.error; }
        }
        return result;
    }
function uniqueBySpan ( elements ) { var e_5 , _a ; var result = [ ] ; var map = new Map ( ) ; try { for ( var elements_1 = tslib_1 . __values ( elements ) , elements_1_1 = elements_1 . next ( ) ; ! elements_1_1 . done ; elements_1_1 = elements_1 . next ( ) ) { var element = elements_1_1 . value ; var span = element . span ; var set = map . get ( span . start ) ; if ( ! set ) { set = new Set ( ) ; map . set ( span . start , set ) ; } if ( ! set . has ( span . end ) ) { set . add ( span . end ) ; result . push ( element ) ; } } } catch ( e_5_1 ) { e_5 = { error : e_5_1 } ; } finally { try { if ( elements_1_1 && ! elements_1_1 . done && ( _a = elements_1 . return ) ) _a . call ( elements_1 ) ; } finally { if ( e_5 ) throw e_5 . error ; } } return result ; }
Return elements filtered by unique span.
Return elements filtered by unique span .