Kevin Jahns

Results 152 comments of Kevin Jahns

I experienced the same @benjie (how small the GitHub universe is :slightly_smiling_face: ). https://jsperf.com/the-cost-of-objects returns 500 ever since I added a comment. Trying again without comments..

Hi @ViktorQvarfordt, This is a limitation of the typing system. We can only enforce the typings of the returned values. We can't give specific typings to each prop. In most...

> What do you think about making .get() be generic so that .get() returns type T? The sole purpose would be to get some flexibility and allow .get().get(). Today we...

So the value of the root-level Y.Map is a Y.Map as well? Then you can define the value-type accordingly: `ydoc.getMap().get(id1).get(id2) // ⇒ string | undefined`. You can nest this further....

`Y.Map` should work similarly to the normal `Map`. You don't do `map.get()`. Instead, you define the map accordingly so you don't have to provide `string` every time you access data:...

Oh wow.. this actually works! :exploding_head: ```js /** * Returns a specified element from this YMap. * * @template {keyof MapType} MKey * * @param {MKey} key * @return {MapType[MKey]}...

Thank you for the test case! I'll look into it after the next release.

It's definitely possible. However, what would you do with the structs that are exposed by the `doa` event? (I try to avoid exposing internals.)

Thank you, this looks pretty good. I'll probably merge it in a few weeks when I'm back from vacation.

- [ ] TODO: don't encode relativePositions using toUint8Array - [ ]