While working on testing D10553, I noticed the following error: [image]
This regression was caused by [my changes in D10004](https://phab.comm.dev/D10004#change-bQ24GLJ5Qlp7). I added an `invariant` to satisfy Flow there, but I didn't consider that I was adding a function call to a worklet. Reanimated worklets can only call other functions that are worklets; otherwise, the call should be proxied via `runOnJS`.
This diff updates the call to just `throw new Error` instance, which works just as well for Flow. I'm not sure if using `Error` within a worklet will cause an issue, but it shouldn't matter because the control flow should never enter this conditional, and if it does then we're going to be erroring anyways.