ts-runtime-checks icon indicating copy to clipboard operation
ts-runtime-checks copied to clipboard

[BUG] Infer & check not works properly

Open SirReiva opened this issue 1 year ago • 1 comments

Infer and check don't work correctly with generic parameters, create a union type instead of comparing separately

Playground link playground

Captura de pantalla 2023-08-25 160743

SirReiva avatar Aug 25 '23 14:08 SirReiva

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

GoogleFeud avatar Aug 26 '23 18:08 GoogleFeud