Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(doc): Fix param descriptions for filters #1346

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
16 changes: 12 additions & 4 deletions src/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,26 @@ enum CompositeOperator {
}

/**
* Returns an AND composite filter.
* And filters are composed of many other filters and when they are applied
* then query results are only returned when they pass through all these other
* filters.
*
* @param {EntityFilter[]} filters The list of filters that make up the AND filter.
* @returns {CompositeFilter} A composite AND filter.
*
* @param {EntityFilter[]} filters The filters that make up the AND filter.
*/
export function and(filters: EntityFilter[]): CompositeFilter {
return new CompositeFilter(filters, CompositeOperator.AND);
}

/**
* Returns an OR composite filter.
* Or filters are composed of many other filters and when they are applied
* then query results are returned when they pass through any of these other
* filters.
*
* @param {EntityFilter[]} filters The list of filters that make up the OR filter.
* @returns {CompositeFilter} A composite OR filter.
*
* @param {EntityFilter[]} filters The filters that make up the OR filter.
*/
export function or(filters: EntityFilter[]): CompositeFilter {
return new CompositeFilter(filters, CompositeOperator.OR);
Expand Down
Loading