You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of Type.Self (or whatever we were to call it) could simply be undefined, but I'd prefer something like {'@@functional/recursive-type-reference': true}.
What do you think, @JAForbes? Do you agree that one of these would be better than undefined? If so, what would you like the property to be named?
The text was updated successfully, but these errors were encountered:
@davidchambers I think a sentinel makes for a cleaner/clearer API. Whichever name you prefer is fine with me. I also agree an explicit value for the recursive type reference is a better choice.
Haskell:
JavaScript:
There's also a hack which looks better but relies on confusing JavaScript behaviour and doesn't work with
const
.If we're to use a sentinel value (such as
undefined
), why not use one which is more descriptive? We could support one of the following:The value of
Type.Self
(or whatever we were to call it) could simply beundefined
, but I'd prefer something like{'@@functional/recursive-type-reference': true}
.What do you think, @JAForbes? Do you agree that one of these would be better than
undefined
? If so, what would you like the property to be named?The text was updated successfully, but these errors were encountered: