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 @@
}

/**
* 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 filters that make up the AND filter.
* @param {EntityFilter[]} filters The list of filters that make up the and filter.
cindy-peng marked this conversation as resolved.
Show resolved Hide resolved
* @returns {CompositeFilter} A composite AND filter.
*

Check failure on line 43 in src/filter.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `·`

Check failure on line 43 in src/filter.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
*/
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 filters that make up the OR filter.
* @param {EntityFilter[]} filters The list of filters that make up the or filter.
cindy-peng marked this conversation as resolved.
Show resolved Hide resolved
* @returns {CompositeFilter} A composite OR filter.
*

Check failure on line 56 in src/filter.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `·`

Check failure on line 56 in src/filter.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
*/
export function or(filters: EntityFilter[]): CompositeFilter {
return new CompositeFilter(filters, CompositeOperator.OR);
Expand Down Expand Up @@ -153,6 +161,6 @@
}
}

export function isFilter(filter: any): filter is EntityFilter {

Check warning on line 164 in src/filter.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
return filter instanceof EntityFilter;
}
Loading