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
What the alias does or does it affect all generics with the same keyword as the alias.
How to implement an open object generics
How to implement an open object interface
It also needs an example where an open object accepts another open object as a parameter, similar to this:
typea('a) = {
..
myAMethod: unit => unit
} as 'a;typeb('b, 'a) = {
..
/* some implementation that uses the generic */
} as 'a
I found this a problem when I was writing Reaxon, specially with this kind of types:
typesubscription=Cancellable.Boolean.i;typeobserver('observer, 'a) = {
..
onSubscribe: subscription => unit,
onSuccess: 'a => unit,
onError: exn => unit,
} as 'observer;typet('observer,'a) = {
.
subscribeWith: observer('observer, 'a) => unit,
};
The text was updated successfully, but these errors were encountered:
For example, in the Open Objects example
The tutorial does not explain:
It also needs an example where an open object accepts another open object as a parameter, similar to this:
I found this a problem when I was writing Reaxon, specially with this kind of types:
The text was updated successfully, but these errors were encountered: