-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnionTypes demo #11
Comments
Sorry that one's confusing. Someone else had commented on this before (#9) and I've been meaning to rework that whole suite but just haven't gotten around to it yet. The "solution" is just to change one to match the other. All test is showing as it is written right now is that it compiles without error even though they are "different" values in the same type. It's not a very good test though. |
@robertjlooby Yeah this one was confusing to me too because it doesn't have that phaceholder text. Maybe adding a comment there would make it clearer 😄 |
The third union type test is actually OK. IMHO. They are of the same type, but different. So ...
the trick is simply to change @robertjlooby Thank you for this fun exercise. Intuition often arrives after hard work. |
I think I like @nashamri's idea to throw a comment in there |
Thank you everyone for your input on this and sorry to anyone who found it confusing. I put a comment in there (#25) which will hopefully make it less confusing going forward. |
Hey, not sure what the solution to the 3rd union type test is? Seems to require a different assertion function, something like
assertSameType
?The text was updated successfully, but these errors were encountered: