Skip to content

Commit

Permalink
fixed type
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMilord committed Jun 18, 2024
1 parent d9ac704 commit ab1a0fd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import {LightningElement, track, api} from 'lwc';
/** @typedef {import("coveo").SearchStatus} SearchStatus */
/** @typedef {import("coveo").SearchEngine} SearchEngine */
/** @typedef {import("coveo").SortCriterion} SortCriterion */

/**
* @typedef SortOption
* @typedef {Object} SortOption
* @property {string} label
* @property {string} value
* @property {SortCriterion} criterion
Expand Down Expand Up @@ -160,18 +161,17 @@ export default class QuanticSort extends LightningElement {
* @returns {SortOption[]} The specified custom sort options.
*/
get customSortOptions() {
/** @type {SortOption[]} */
// @ts-ignore
const elements = Array.from(this.querySelectorAll('c-quantic-sort-option'));
if (elements.length === 0) {
return [];
}
return elements.map((element) => {
return {
// @ts-ignore
label: element.label,
// @ts-ignore
value: element.value,
criterion: {
// @ts-ignore
by: element.criterion.by,
// @ts-ignore
order: element.criterion.order,
Expand Down

0 comments on commit ab1a0fd

Please sign in to comment.