Open
Description
/**
* @overload
* @param {number} x
*/
/**
* @overload
* @param {string} x
*/
/**
* @param {string | number} x
* @returns {string | number}
*/
function id(x) {
return x;
}
Expected:
This overload of 'id' lacks a return-type annotation and implicitly has an 'any' return type.
Actual:
This overload implicitly returns the type 'any' because it lacks a return type annotation.
Compare to the message for TS overloads:
'id', which lacks return-type annotation, implicitly has an 'any' return type.
Blocked on being able change errors in Go; right now they are generated from the Typescript submodule.