You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens in cases where the awaited Promise.all is assigned to a variable.
Example 1: array unpacking
const[x]=awaitPromise.all([getSomeData()])// turns intoconst[x]=awaitgetSomeData()// but should beconstx=awaitgetSomeData()
Example 2: simple assignment targets
constarr=awaitPromise.all([getSomeData()])console.log('waited for ',arr.length,'fetch requests')// turns intoconstarr=getSomeData()console.log('waited for ',arr.length,'fetch requests')// not an array anymore, has incorrect semantics// we should not auto-fix this case.
The text was updated successfully, but these errors were encountered:
This happens in cases where the awaited
Promise.all
is assigned to a variable.Example 1: array unpacking
Example 2: simple assignment targets
The text was updated successfully, but these errors were encountered: