automerge / hypermerge

Build p2p collaborative applications without any server infrastructure in Node.js
MIT License
1.28k stars 66 forks source link

Request for documentation around Repo constructor #19

Closed canadaduane closed 4 years ago

canadaduane commented 5 years ago

I think the old interface (0.3.x) was to use something like import Hypermerge from 'hypermerge' while it seems the most common way to use the latest Hypermerge is import { Repo } from 'hypermerge'. However, there aren't many hints as to how to do that in the code.

https://github.com/automerge/hypermerge/blob/master/src/Repo.ts#L38

The Chat example also references the "old way":

https://github.com/automerge/hypermerge/blob/master/examples/chat/channel.js

canadaduane commented 5 years ago

It might also be a good time to change all the "id: string" params to "url: string".

pvh commented 4 years ago

This now has some types! I'm going to close this out and open a separate issue to remove / replace the old chat example code.