Does Y.js have counters? (such as a grow-only counter?)

Yjs seems to specialize in collaborative text-editing mostly. As far as I can tell it offers no counters, such a grow-only (“GCounter”), or incrementing/decrementing (“PNCounter”) counters.

Is that correct? If we need that, should we implement it as new custom shared type, or isn’t Yjs really suitable for this type of CRDT?

I imagine a grow-only counter could be implemented as a custom shared type. You would just need to adjust the integration algorithm to make it monotonic.

I haven’t implemented a custom shared type myself, but there is no reason in principle why it isn’t possible with the underlying CRDT.