We can search across existing code to both find examples of places where this proposal could have potentially helped, and also gauge how common it is.
If code is passing in a literal array to Promise.all this can be a good sign (low false positives) that the code is waiting for a static set of promises, as opposed to a variables length array of homogenous results.
We can search across existing code to both find examples of places where this proposal could have potentially helped, and also gauge how common it is.
If code is passing in a literal array to
Promise.all
this can be a good sign (low false positives) that the code is waiting for a static set of promises, as opposed to a variables length array of homogenous results.Here's a SourceGraph query for
[...] = await Promise.all([...])
: https://sourcegraph.com/search?q=context:global+%28lang:JavaScript+or+lang:TypeScript%29++-file:test+-file:node_modules+%5B...%5D+%3D+await+Promise.all%28%5B...%5D%29&patternType=structural&sm=1&groupBy=repoSome selected examples from the results:
https://github.com/mozilla/pdf.js/blob/ccb72073b0bef9e9809e3230c3cede34f41dc757/web/pdf_document_properties.js#L122-L138
https://github.com/jupyterlab/jupyterlab/blob/ef485f16c67e6d1f2e83334d6813f94d626c39e5/packages/terminal/src/widget.ts#L604-L611
https://github.com/NodeBB/NodeBB/blob/8744e4121eca1d2fc30226e05418c0f3e90a5522/src/groups/index.js#L123-L132