a2e4a282e7
* Get [type] parameter types from @type tag Previously only the return type was used in cases like this: ```js /** @type {<T>(param?: T) => T | undefined} */ function g(param) { return param; } ``` Now the type parameters from the type tag are used, and the compiler gets the type of the parameter by using the position in the signature of the type tag. Fixes #25618 * Fix split ifs according to PR comments
13 lines
208 B
TypeScript
13 lines
208 B
TypeScript
// @checkJs: true
|
|
// @allowJs: true
|
|
// @noEmit: true
|
|
// @strict: true
|
|
// @Filename: bug25618.js
|
|
|
|
/** @type {<T>(param?: T) => T | undefined} */
|
|
function typed(param) {
|
|
return param;
|
|
}
|
|
|
|
var n = typed(1);
|
|
|