TypeScript/tests/cases/conformance/jsdoc/typedefTagNested.ts

46 lines
790 B
TypeScript
Raw Normal View History

// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: a.js
/** @typedef {Object} App
* @property {string} name
* @property {Object} icons
* @property {string} icons.image32
* @property {string} icons.image64
*/
var ex;
/** @type {App} */
const app = {
name: 'name',
icons: {
image32: 'x.png',
image64: 'y.png',
}
}
/** @typedef {Object} Opp
* @property {string} name
* @property {Object} oops
* @property {string} horrible
* @type {string} idea
*/
var intercessor = 1
/** @type {Opp} */
var mistake;
/** @typedef {Object} Upp
* @property {string} name
* @property {Object} not
* @property {string} nested
*/
/** @type {Upp} */
var sala = { name: 'uppsala', not: 0, nested: "ok" };
sala.name
sala.not
sala.nested