Robin Malfait 4fddd2d611
Polish matchVariant API (#9313)
* convert the `matchVariant` to look more like `addVariant`

With the biggest difference that the `matchVariant` will have a callback
function that receives the current value of the variant.

* use object as argument for `matchVariant` callback

This will allow us to add more properties in the future if needed
without breaking changes.

- This is a breaking change: `(value) => ...` -> `({ value, other }) => ...`
- This is **not** a breaking change: `({ value }) => ...` -> `({ value, other }) => ...`

* add types for `matchVariant`
2022-09-16 15:37:35 +02:00
..
2022-09-16 15:37:35 +02:00
2022-06-09 16:38:45 -04:00