TypeScript/tests/cases/conformance/jsdoc/jsdocTemplateConstructorFunction2.ts
Nathan Shively-Sanders e65681a2b7
Fix assert in getjsdochost (#23575)
* Fix assert in getJSDocHost

* Update public API to add wider type

* Remove now-unnecessary type assertion
2018-04-20 10:41:58 -07:00

27 lines
403 B
TypeScript

// @allowJs: true
// @checkJs: true
// @noEmit: true
// @Filename: templateTagWithNestedTypeLiteral.js
/**
* @template {T}
* @param {T} t
*/
function Zet(t) {
/** @type {T} */
this.u
this.t = t
}
/**
* @param {T} v
* @param {object} o
* @param {T} o.nested
*/
Zet.prototype.add = function(v, o) {
this.u = v || o.nested
return this.u
}
var z = new Zet(1)
z.t = 2
z.u = false