Closed
Description
// @noImplicitAny: true
/**
* @constructor
* @template {string} K
* @template V
*/
// function Multimap() {
var Multimap = function() {
/** @type {Object<string, V>} TODO: Remove the prototype from the fresh object */
this._map = {};
};
Multimap.prototype = {
/**
* @param {K} key
* @param {V} value
*/
set: function(key, value) {
var set = this._map.get(key);
if (!set) {
set = new Set();
this._map.set(key, set);
}
set.add(value);
}
}
Expected behavior:
No errors on this._map
references.
Actual behavior:
Property '_map' doesn't exist on type { set(key: K): V }
.