You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#51234 introduced a new @overload tag, but it doesn't have the same type-checking rules as TypeScript's overloads.
Namely that we ensure that for each overload, the implementation signature is assignable to that overload, allowing the return type to be bidirectionally assignable.
If we want the same results in checkJs, then the following should error:
// @ts-check/** * @overload * @param {number} x * @returns {number} *//** * @param {string} x * @returns {string} */functionwut(x){returnString(x);}wut(123).toFixed(2);