TypeScript/tests/cases/conformance/jsdoc/jsdocIndexSignature.ts
Nathan Shively-Sanders 2473ffcaac Add a better test for jsdoc index signatures.
The test case shows that the errorenous error no longer appears.
2017-10-18 13:06:15 -07:00

16 lines
331 B
TypeScript

// @allowJs: true
// @checkJs: true
// @noEmit: true
// @Filename: indices.js
/** @type {Object.<string, number>} */
var o1;
/** @type {Object.<number, boolean>} */
var o2;
/** @type {Object.<boolean, string>} */
var o3;
/** @param {Object.<string, boolean>} o */
function f(o) {
o.foo = 1; // error
o.bar = false; // ok
}