Comparison/text filter and nested AND, OR and NOT expressions.
The default operator is equality. Text operators ignore case. Empty AND is true; empty OR is false. Dart matches(item) returns bool; Vue txMatches(item, filter) returns boolean. Getter errors propagate.
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)