( usernames: string[] )
| 27 | } |
| 28 | |
| 29 | export async function fetchGithubUsers( |
| 30 | usernames: string[] |
| 31 | ): Promise<GitHubUser[]> { |
| 32 | const userPromises = usernames.map(username => fetchGitHubUser(username)) |
| 33 | const users = await Promise.all(userPromises) |
| 34 | return users.filter((user): user is GitHubUser => user !== null) |
| 35 | } |
no test coverage detected