Skip to content

Instantly share code, notes, and snippets.

@ilyalesik
Last active August 29, 2018 08:18
Show Gist options
  • Select an option

  • Save ilyalesik/e47f940048702ca8f1a1a63280ed9b00 to your computer and use it in GitHub Desktop.

Select an option

Save ilyalesik/e47f940048702ca8f1a1a63280ed9b00 to your computer and use it in GitHub Desktop.
// @flow
type AsideFilterProps<V: {[string]: {| name: string|}}, T: {[string]: {| name: string, group: $Keys<V>|}}> = {
groups: V,
checkboxes: T,
values: {[$Keys<T>]: boolean}
};
function f<V, T>(props: AsideFilterProps<V, T>): void {}
f({
groups: {g1: {name: "g1"}},
checkboxes: {f1: { name: "f1", group: "g1" }, f2: { name: "f2" , group: "g1"}},
values: {
f1: true,
f2: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment