Merge of Union #193
Unanswered
dmfilipenko
asked this question in
Wiki
Replies: 2 comments
-
Hi @dmfilipenko, I just released an upgraded version of import {O, U} from 'ts-toolbelt'
type A = {id: string}
type B = {uuid: string} | {name: string}
type t = O.Either<U.Merge<B | A>, 'id' | 'uuid', 0> TypeScript does not perform excess property checks on unions, so I guess you'd rather use the first: type t = O.Either<U.Merge<B | A>, 'id' | 'uuid'> Cheers |
Beta Was this translation helpful? Give feedback.
0 replies
-
@pirix-gh <3 thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🤔 Question
Describe your question
What is the best way to transform this
to something like this
Search tags, topics
merge unions
Beta Was this translation helpful? Give feedback.
All reactions