TypeScript/tests/cases/conformance/jsdoc/paramTagTypeResolution.ts
Nathan Shively-Sanders 6450490844
Fix jsdoc type resolution [merge to master] (#24204)
* Fix JSDoc type resolution

Breaks type parameter resolution that is looked up through prototype
methods, though. I need to fix that still.

* Check for prototype method assignments first

* Undo dedupe changes to getJSDocTags

* JS Type aliases can't refer to host type params

Previously, js type aliases (@typedef and @callback) could refer to
type paremeters defined in @template tags in a *different* jsdoc tag, as
long as both tags were hosted on the same signature.

* Reduce dedupe changes+update baseline

The only reason I had undone them was to merge successfully with an
older state of master.
2018-05-17 10:46:10 -07:00

14 lines
269 B
TypeScript

// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: first.js
/** @template T
* @param {T} x
* @param {(t: T) => void} k
*/
module.exports = function (x, k) { return k(x) }
// @Filename: main.js
var f = require('./first');
f(1, n => { })