ts-runtime-checks
ts-runtime-checks copied to clipboard
[BUG] Infer & check not works properly
Infer and check don't work correctly with generic parameters, create a union type instead of comparing separately
Playground link playground
Hi! Currently, this library isn't the best at handling unions of objects/arrays, This will be looked at very soon, but for now, you could create a discriminated union out of the objects and it should work fine - playground