-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about ascertaining which fields are undefined #8
Comments
Hi @bbarker! Would you be so kind and tell me if you have any suggestion what should be the type (in "pseudcode" ;-)) of this function? I've done some investigation regarding homogeneous records (which surprisingly maybe can be useful here) and I'm doing recursive traversing in this lib so maybe I can try to help. |
Hi @paluh , thanks for the reply. I'll try to add more pseudocode and some more description.
fieldX: Opt X -- in TOpt
fieldX: X -- in Opt But what if instead we have a relationship like: fieldX: Opt XOpt -- in TOpt
fieldX: X -- in Opt That is, The tricky part (well, there are probably several tricky parts) to me is that in the recursive case, what if |
It would be somewhat useful for certain applications to see which
Opt
fields of a nested record are undefined. My example is I'd like to use something like this for the ViewModel in an application, where I have an extended View Model withOpt
values, based on a Record type without anyOpt
values that represents just the "Model". To give feedback to the user, it would be great to be able to query whichOpt
fields are still undefined.Is this something that might be doable?
Thanks,
The text was updated successfully, but these errors were encountered: