Skip to content

Instantly share code, notes, and snippets.

@reidev275
Created February 25, 2020 18:02
Show Gist options
  • Select an option

  • Save reidev275/5342630678fc4140650978b94c00011a to your computer and use it in GitHub Desktop.

Select an option

Save reidev275/5342630678fc4140650978b94c00011a to your computer and use it in GitHub Desktop.
export type Filter<A> =
| { kind: "Equals"; field: keyof A; val: A[keyof A] }
| { kind: "Greater"; field: keyof A; val: A[keyof A] }
| { kind: "Less"; field: keyof A; val: A[keyof A] }
| { kind: "And"; a: Filter<A>; b: Filter<A> }
| { kind: "Or"; a: Filter<A>; b: Filter<A> };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment