"of" methods on interfaces, for default implementations
mweidner037 opened this issue · comments
mweidner037 commented
To mitigate possible doc overload from many implementations: have a static "of" method on each interface that returns a reasonable default implementation. E.g. AddWinsSet for non-Crdt types; restorable (non-GCing) YjsCrdtSet for Crdt types, using the Crdt constructor itself as the valueConstructor.
I think this should be possible by declaring e.g.
const CSet = {
of(...) { ... }
}
in addition the CSet interface.
Originally posted by @mweidner037 in #102 (comment)
mweidner037 commented
Instead, the default implementations get the shortest name (e.g. CSet
).