UNPKG

1.66 kBTypeScriptView Raw
1import { Constructable, Entity, EntityIdentifiable } from '../entity';
2import type { Filterable } from './filterable';
3/**
4 * Data structure to combine [[Filterable]]s conjunctively and / or disjunctively. A FilterList matches when all filterables within the `andFilters` match and when at least one filterable within the `orFilters` matches. Should not be used directly.
5 * @typeparam EntityT -
6 */
7export declare class FilterList<EntityT extends Entity> implements EntityIdentifiable<EntityT> {
8 andFilters: Filterable<EntityT>[];
9 orFilters: Filterable<EntityT>[];
10 /**
11 * Constructor type of the entity to be filtered.
12 */
13 readonly _entityConstructor: Constructable<EntityT>;
14 /**
15 * Entity type of the entity tp be filtered.
16 */
17 readonly _entity: EntityT;
18 /**
19 * Creates an instance of FilterList.
20 * @param andFilters - Filters to be combined by logical conjunction (`and`)
21 * @param orFilters - Filters to be combined by logical disjunction (`or`)
22 */
23 constructor(andFilters?: Filterable<EntityT>[], orFilters?: Filterable<EntityT>[]);
24 /**
25 * @deprecated Since v1.28.1. This function should not be used, since some OData Services might not support the flattened filter expression.
26 * Flattens `andFilters` and `orFilters` as far as possible while staying logically equivalent.
27 * @returns Flattened filter list.
28 */
29 flatten(): FilterList<EntityT>;
30 private canFlatten;
31 private isEmpty;
32 private _flatten;
33}
34export declare function isFilterList<T extends Entity>(filterable: Filterable<T>): filterable is FilterList<T>;
35//# sourceMappingURL=filter-list.d.ts.map
\No newline at end of file