TypeScript/tests/cases/conformance/jsdoc/paramTagTypeResolution2.ts
Nathan Shively-Sanders 3b107fec3b
Fix @param type parameter lookup (#39532)
Previously, getObjectTypeInstantiation had special-case code to look up
type parameters for `@param` as if they were in the parameter location.

This should occur in the main lookup loop of `getOuterTypeParameters`,
however. The current code only runs once, which is not sufficient, and
it also jumps to the parameter for any type contained in a `@param`,
which skips type parameters that occur in the tag itself.
2020-07-10 08:42:25 -07:00

15 lines
241 B
TypeScript

// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: 38572.js
/**
* @template T
* @param {T} a
* @param {{[K in keyof T]: (value: T[K]) => void }} b
*/
function f(a, b) {
}
f({ x: 42 }, { x(param) { param.toFixed() } });