1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
tests/cases/conformance/salsa/bug26885.js(2,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
tests/cases/conformance/salsa/bug26885.js(11,16): error TS7017: Element implicitly has an 'any' type because type '{}' has no index signature.
==== tests/cases/conformance/salsa/bug26885.js (2 errors) ====
function Multimap3() {
this._map = {};
~~~~
!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
};
Multimap3.prototype = {
/**
* @param {string} key
* @returns {number} the value ok
*/
get(key) {
return this._map[key + ''];
~~~~~~~~~~~~~~~~~~~
!!! error TS7017: Element implicitly has an 'any' type because type '{}' has no index signature.
}
}
/** @type {Multimap3} */
const map = new Multimap3();
const n = map.get('hi')
|