You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that Typia only validates that the body matches A and doesn't check whether it matches B. This problem resolves itself if someBool is required as non-undefined, or if name is required.
I believe that A | B (see below) should match given that TypeScript doesn't have any issues with the following:
When there's same type exists in both `atomics` and `constants` and try to predicate union type about that case, `typia` mis-computes whether each types are intersected or not.
This PR fixes the bug, just by adding the special logic about the same typed `atomics` and `constants` are compatible.
📝 Summary
Type equality (
assert
,is
, etc.) with certain union objects with optional fields is parsed as non-equal.It seems that Typia only validates that the body matches
A
and doesn't check whether it matchesB
. This problem resolves itself ifsomeBool
is required as non-undefined, or ifname
is required.I believe that
A | B
(see below) should match given that TypeScript doesn't have any issues with the following:⏯ Playground Link
💻 Code occuring the bug
The text was updated successfully, but these errors were encountered: