Open
Description
Often, I use @type
because the @param
+ @return
syntax is so unwieldy; however, it's not usable with @overload
.
// @ts-check
/**
* @overload
* @type {(x: number) => number}
*/
/**
* @type {(x: number) => number}
*/
function id(x) {
return x;
}
id(123).toFixed(2);
// ~~~ Expected 0 arguments, but got 1.
I'd expect the above not to error; but it does.