propero-oss/easy-filter

View on GitHub
src/types/set-filter.ts

Summary

Maintainability
A
0 mins
Test Coverage
export type SetOperator = "in" | "not-in";

export interface SetFilter<T = any, F = any> {
  op: SetOperator;
  items: (F extends keyof T ? T[F] : any)[];
  field: F;
}

export type SetValueOperator = "null" | "not-null";

export interface SetValueFilter<F> {
  op: SetValueOperator;
  field: F;
}