code: 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;
      }
  }
docs: Gets the next sort direction