Replies: 1 comment
-
|
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
-
Is there some way of doing something like:
It would be particularly useful in cases where you define things like config schemas and want to use parts of that full config schema in different components and the config schema might have versions and you have defined different versions and conversion functions between them but don't want to do the same for separate unique definitions of each part of the config schema as you would quickly lose your mind. So just having that subpart of the config be defined as
.shape
of that part of the full config would be great (and is something you can do in typescript) but so far as I am aware you cannot do that directly for a discriminated union member.Beta Was this translation helpful? Give feedback.
All reactions