TypeScript/tests/cases/conformance/jsdoc/typedefTagExtraneousProperty.ts
Nathan Shively-Sanders 1bbcb5553a
@typedef's nested Object syntax disallows type arguments (#36172)
Previously the jsdoc index signature syntax was incorrectly treated the
same as Object:

```js
/** @typedef {Object} AllowsNesting
 * @property ... */
/** @typedef {Object.<string,string>} IncorrectlyAllowsNesting */
```

Fixes #34911
2020-01-29 12:53:00 -08:00

16 lines
346 B
TypeScript

// @lib: es5
// @allowjs: true
// @checkjs: true
// @noemit: true
// @Filename: typedefTagExtraneousProperty.js
/** @typedef {Object.<string,string>} Mmap
* @property {string} ignoreMe - should be ignored
*/
/** @type {Mmap} */
var y = { bye: "no" };
y
y.ignoreMe = "ok but just because of the index signature"
y['hi'] = "yes"