Accept multiple types of value objects #792
|
How could I handle a scenario where you want to accept multipe types of ValueObjects? In the function below I want to receive a PersonId or CompanyId value. Thanks! |
Answered by
viceroypenguin
May 24, 2025
Replies: 1 comment 2 replies
|
I would use something like |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No, that is explicitly not what I suggested. I would recommend using the
OneOflibrary as follows: