diff --git a/src/types/YMap.js b/src/types/YMap.js index 16b07f2a..6374dfd7 100644 --- a/src/types/YMap.js +++ b/src/types/YMap.js @@ -65,7 +65,7 @@ export class YMapEvent extends YEvent { * A shared Map implementation. * * @extends AbstractType> - * @implements {Iterable<[string, MapType]>} + * @implements {Iterable<[StringKey, MapType[StringKey]]>} */ export class YMap extends AbstractType { /** @@ -176,7 +176,7 @@ export class YMap extends AbstractType { /** * Returns the values for each element in the YMap Type. * - * @return {IterableIterator} + * @return {IterableIterator} */ values () { return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => v[1].content.getContent()[v[1].length - 1]) @@ -185,7 +185,7 @@ export class YMap extends AbstractType { /** * Returns an Iterator of [key, value] pairs * - * @return {IterableIterator<[string, MapType]>} + * @return {IterableIterator<[StringKey, MapType[StringKey]]>} */ entries () { return iterator.iteratorMap(createMapIterator(this._map), /** @param {any} v */ v => /** @type {any} */ ([v[0], v[1].content.getContent()[v[1].length - 1]])) @@ -207,7 +207,7 @@ export class YMap extends AbstractType { /** * Returns an Iterator of [key, value] pairs * - * @return {IterableIterator<[string, MapType]>} + * @return {IterableIterator<[StringKey, MapType[StringKey]]>} */ [Symbol.iterator] () { return this.entries() diff --git a/tests/y-map.tests.js b/tests/y-map.tests.js index 92571c52..16faa107 100644 --- a/tests/y-map.tests.js +++ b/tests/y-map.tests.js @@ -14,7 +14,7 @@ import * as prng from 'lib0/prng' export const testIterators = _tc => { const ydoc = new Y.Doc() /** - * @type {Y.Map} + * @type {Y.Map>} */ const ymap = ydoc.getMap() // we are only checking if the type assumptions are correct