import { type NonReducibleUnknown } from "https://deno.land/x/xstate@xstate%405.0.0-beta.23/src/types.ts";
T | unknown
reduces to unknown
and that can be problematic when it comes to contextual typing.
It especially is a problem when the union has a function member, like here:
declare function test(cbOrVal: ((arg: number) => unknown) | unknown): void;
test((arg) => {}) // oops, implicit any
This type can be used to avoid this problem. This union represents the same value space as unknown
.