release/utils/sort.js
function nextSortDir(sortType, current) {
    if (sortType === types_1.SortType.single) {
        if (current === types_1.SortDirection.asc) {
            return types_1.SortDirection.desc;
        }
        else {
            return types_1.SortDirection.asc;
        }
    }
    else {
        if (!current) {
            return types_1.SortDirection.asc;
        }
        else if (current === types_1.SortDirection.asc) {
            return types_1.SortDirection.desc;
        }
        else if (current === types_1.SortDirection.desc) {
            return undefined;
        }
        // avoid TS7030: Not all code paths return a value.
        return undefined;
    }
}
function nextSortDir(sortType, current) {
    if (sortType === types_1.SortType.single) {
        if (current === types_1.SortDirection.asc) {
            return types_1.SortDirection.desc;
        }
        else {
            return types_1.SortDirection.asc;
        }
    }
    else {
        if (!current) {
            return types_1.SortDirection.asc;
        }
        else if (current === types_1.SortDirection.asc) {
            return types_1.SortDirection.desc;
        }
        else if (current === types_1.SortDirection.desc) {
            return undefined;
        }
        // avoid TS7030: Not all code paths return a value.
        return undefined;
    }
}
function nextSortDir ( sortType , current ) { if ( sortType === types_1 . SortType . single ) { if ( current === types_1 . SortDirection . asc ) { return types_1 . SortDirection . desc ; } else { return types_1 . SortDirection . asc ; } } else { if ( ! current ) { return types_1 . SortDirection . asc ; } else if ( current === types_1 . SortDirection . asc ) { return types_1 . SortDirection . desc ; } else if ( current === types_1 . SortDirection . desc ) { return undefined ; } // avoid TS7030: Not all code paths return a value. return undefined ; } }
Gets the next sort direction
Gets the next sort direction