-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Open
Labels
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.This issue needs a plan that clarifies the finer details of how it could be implemented.SuggestionAn idea for TypeScriptAn idea for TypeScript