constrain getMap type

This commit is contained in:
Mel Bourgeois 2024-02-24 20:51:09 -06:00
parent b97920bcbb
commit c9995bda17
No known key found for this signature in database
GPG Key ID: 290FCF081AEDB3EC

View File

@ -251,14 +251,14 @@ export class Doc extends Observable {
}
/**
* @template T
* @template {Record<string, import("../internals.js").MapValue>} T
* @param {string} [name]
* @return {YMap<T>}
*
* @public
*/
getMap (name = '') {
return /** @type {YMap<T>} */ (this.get(name, YMap))
return /** @type {YMap<T>} */ /** @type {any} */ (this.get(name, YMap))
}
/**