-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
Description
This happens in cases where the awaited Promise.all is assigned to a variable.
Example 1: array unpacking
const [x] = await Promise.all([getSomeData()])
// turns into
const [x] = await getSomeData()
// but should be
const x = await getSomeData()Example 2: simple assignment targets
const arr = await Promise.all([getSomeData()])
console.log('waited for ', arr.length, 'fetch requests')
// turns into
const arr = getSomeData()
console.log('waited for ', arr.length, 'fetch requests') // not an array anymore, has incorrect semantics
// we should not auto-fix this case.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
None yet