I'm using the v4 beta.
I had this logic in place to count attempts
useEffect(() => {
if (!run) return;
console.log('🚀 ~ run:', run);
if (run.status === 'QUEUED') {
setIsLoading(true);
}
if (run.status === 'REATTEMPTING') {
setAttempt((prev) => prev + 1);
}
if (run.status === 'FAILED' || run.status === 'COMPLETED') {
setIsLoading(false);
}
if (run.status === 'COMPLETED' && run.output) {
callback({
url: new URL(run.output),
isRandom: false,
router,
});
setIsLoading(false);
setOpen(false);
}
}, [run?.status]);
Now, after upgrading to 4.0.0-v4-beta.25, I get a typescript error: error TS2367: This comparison appears to be unintentional because the types '"PENDING_VERSION" | "QUEUED" | "DEQUEUED" | "EXECUTING" | "WAITING" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT"' and '"REATTEMPTING"' have no overlap.
What do you recommend I do?