Search Docs
Loading...
Skip to content

Type Alias: AssetFilter

type AssetFilter =
| AssetPropertyFilter
| {
and: AssetFilter[];
or?: never;
not?: never;
property?: never;
}
| {
or: AssetFilter[];
and?: never;
not?: never;
property?: never;
}
| {
not: AssetFilter;
and?: never;
or?: never;
property?: never;
};

Filter expression — predicate or logical combinator. Combinators nest arbitrarily. The union is mutually exclusive: an object with both and and or, or with property next to a combinator key, is rejected at the type level.

Missing-key semantics for not: a predicate is false on an asset that lacks the targeted field, so a negated meta.foo === 'x' matches assets where meta.foo !== 'x' and assets that lack meta.foo entirely.