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
I interpreted the referenced comment to mean "assignment to a parameter of type any" not "assignment from an argument of type any", so I may have missed that.
as the first applicable signature without assignment to any (described as the expected behavior here)
π Search Terms
overload, multiple call signature
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?target=99&jsx=0&ts=4.8.4&q=5#code/JYOwLgpgTgZghgYwgAgHIHswG8BQz-IAUAHgFzIBG66ANhHCAJTlW30gDceBJ58NAZwjNkYKAFcIXAkTKiJwvnEFTu+XpWp0GI1ts44AvjhwATCAhpwoKAG7XkITKQxgcCdCAFhHmAIIgAJ7IALy+YIRikshwAjFBjMgA9Eny0QCEAPxZOCkyAHqZQA
π» Code
π Actual behavior
The type of
notAny
is inferred astrue
, the return type of the second overload call signature.π Expected behavior
The type of
notAny
should infer toboolean
, as the first applicable signature without assignment toany
(described as the expected behavior here)Alternately the type of
notAny
should infer toboolean
as the last signature (and thus the typeReturnType<Not>
).Additional information about the issue
Variation of this issue originally reported in #59064.
The text was updated successfully, but these errors were encountered: