Union type
#902
Replies: 1 comment
-
the type is correct
the prop option type is not correct, this would evaluate to a boolean, making the field a boolean in your case you likely want nested-discriminators |
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
-
Hello, please take a look at the following code
So, basically extra field in A class can be either B or C and nothing else. (if extra does not match B or C -> i should throw an error in strict mode) How do I achieve this in typegoose, because what I did does not work? Error is 'CastError: Cast to Embedded failed for value "{ name: 'name', grade: 10, sso: 'sdfdsfsdfs' }" (type Object) at path "extra" because of "StrictModeError"'
Beta Was this translation helpful? Give feedback.
All reactions