Closed fernandoabolafio closed 2 years ago
I found out that you can bypass this error by wrapping mutate
and groupBy
inside when
clause:
tidy(
data,
when( true, [ // < don't forget the bracket
mutate( /* some mutation */ ),
groupBy( /*some grouping */),
]);
);
While this works, I didn't have time to work out why it works, if someone can elaborate that would be great!
Should be fixed in 2.5.0+ https://codesandbox.io/s/silly-beaver-db0t60?file=/src/App.tsx
See the code example here: https://codesandbox.io/s/divine-cache-x3rzjj?file=/src/App.tsx
Basically doing this:
Results in a Typescript error.
Note: It doesn't matter which argument is passed to
groupBy
, the error persists either way.