Open
Description
Bug Report
π Search Terms
overload argument type signature
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about overloads (and Calling an overloaded function should resolve to best match, not firstΒ #48077)
β― Playground Link
Playground link with relevant code
π» Code
declare const it: {
(test: () => Promise<void>): void;
(test: (input: string) => void): void;
}
it((input) => {
input.toUpperCase();
});
it(async () => {
// ..
});
π Actual behavior
Error: Parameter 'input' implicitly has an 'any' type.
π Expected behavior
No type error. The input
parameter is type string
and should be resolved as such.
For more context, see DefinitelyTyped/DefinitelyTyped#59075.