async function getUsers(): Promise<void> {
const limitValuesInSample = 1
await Promise.all(
usersState.map(async (user) => {
const { response } = await makeRequest(
usersApi.getUserById({
userId: user.id,
limit: 99
...
}),
responseStatus
)
if (response !== undefined) {
user.isActiveUser = response.length > 0
}
})
).then(() => {
... какие-то еще действия
}))
})
}