| 15 | * @param {t.TestCase} _tc |
| 16 | */ |
| 17 | export const testIterators = _tc => { |
| 18 | const ydoc = new Y.Doc() |
| 19 | /** |
| 20 | * @type {Y.Type<{attrs: { [k:string]: number} }>} |
| 21 | */ |
| 22 | const ymap = ydoc.get() |
| 23 | // we are only checking if the type assumptions are correct |
| 24 | /** |
| 25 | * @type {Array<number>} |
| 26 | */ |
| 27 | const vals = Array.from(ymap.attrValues()) |
| 28 | /** |
| 29 | * @type {Array<[string,number]>} |
| 30 | */ |
| 31 | const entries = Array.from(ymap.attrEntries()) |
| 32 | /** |
| 33 | * @type {Array<string>} |
| 34 | */ |
| 35 | const keys = Array.from(ymap.attrKeys()) |
| 36 | console.log(vals, entries, keys) |
| 37 | } |
| 38 | |
| 39 | export const testNestedMapEvent = () => { |
| 40 | const ydoc = new Y.Doc() |
nothing calls this directly
no test coverage detected
searching dependent graphs…