/**
* @constructor
* @template {string} K
* @template V
*/
function Multimap() {
/** @type {Object<string, V>} TODO: Remove the prototype from the fresh object */
this._map = {};
};
var Ns = {}
/** @type {Multimap<"a" | "b", number>} */
const map = new Multimap();
const n = map._map['hi']
Expected behavior:
n: number
Actual behavior:
n: any in 3.0; n: V in 3.1-dev.
Types resolved from functions are never properly generic, even that function has @template-specified type parameters; they're only special-cased in a few places to produce a specific instantiation of a type. They should use the normal generic type machinery that Typescript does.
Expected behavior:
n: numberActual behavior:
n: anyin 3.0;n: Vin 3.1-dev.Types resolved from functions are never properly generic, even that function has
@template-specified type parameters; they're only special-cased in a few places to produce a specific instantiation of a type. They should use the normal generic type machinery that Typescript does.