Why isn't the "Text" property of Option<TType> string? #2062
Replies: 3 comments 4 replies
-
Hmm, not sure if it is a bug per se. Think it has always been like that from te beginning. In a case like
I find it clearer that it is the same type instead of needing to do On the other hand it would allow for things like
So, not opposed to changing it, but we need to make sure it is not going to be a breaking change. |
Beta Was this translation helpful? Give feedback.
-
I went ahead and did a PR #2063 As I don't see Text being anything other than "Text" making any sense. :) |
Beta Was this translation helpful? Give feedback.
-
I agree.
|
Beta Was this translation helpful? Give feedback.
-
I was trying to add in a null Option to my list, but I found the Text property of Options to be of TType. I don't know why this wouldn't always be string. Especially with the Name Text.
In my case I can't construct a fake object because of validation on its constructor.
I think this is a bug and if so I can do a PR. Please confirm.
Beta Was this translation helpful? Give feedback.
All reactions