constrain getMap type
This commit is contained in:
parent
b97920bcbb
commit
c9995bda17
@ -251,14 +251,14 @@ export class Doc extends Observable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @template T
|
* @template {Record<string, import("../internals.js").MapValue>} T
|
||||||
* @param {string} [name]
|
* @param {string} [name]
|
||||||
* @return {YMap<T>}
|
* @return {YMap<T>}
|
||||||
*
|
*
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
getMap (name = '') {
|
getMap (name = '') {
|
||||||
return /** @type {YMap<T>} */ (this.get(name, YMap))
|
return /** @type {YMap<T>} */ /** @type {any} */ (this.get(name, YMap))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user