Vergleichs-/Textfilter und verschachtelte UND-, ODER- und NICHT-Verknüpfungen.
Standardoperator ist Gleichheit. Textoperatoren ignorieren Groß-/Kleinschreibung. Leeres AND ist wahr, leeres OR ist falsch. Dart matches(item) liefert bool, Vue txMatches(item, filter) boolean. Getterfehler werden weitergegeben.
type TxFilter<T> =
| {
selector: TxSelector<T>
operator?:
| '='
| '<>'
| '>'
| '>='
| '<'
| '<='
| 'contains'
| 'startswith'
| 'endswith'
value: unknown
}
| { and: TxFilter<T>[] }
| { or: TxFilter<T>[] }
| { not: TxFilter<T> }import type { TxFilter } from '@tekocloud.de/tecexpress'
const example: TxFilter<{ id: number }> = { selector: 'id', operator: '>=', value: 1 }
console.log(example)