-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Closed
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScript
Milestone
Description
🔎 Search Terms
fromAsync index
🕗 Version & Regression Information
- This changed between versions 5.4 and 5.5
- This changed in commit or PR add
Array.fromAsync
toesnext
#57748 - This is the behavior in every version I tried, and I reviewed the FAQ for entries about
Array.fromAsync
- I was unable to test this on prior versions because it only introduced in 5.4
⏯ Playground Link
💻 Code
Array.fromAsync([ 'a', 'b' ], (str, index) => ({ index, str }));
🙁 Actual behavior
- Argument of type '(str: any, index: any) => { index: any; str: any; }' is not assignable to parameter of type '(value: string) => { index: any; str: any; }'.
Target signature provides too few arguments. Expected 2 or more, but got 1. - Parameter 'str' implicitly has an 'any' type.
- Parameter 'index' implicitly has an 'any' type.
🙂 Expected behavior
index
typed as number
Additional information about the issue
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript