Loading problem…
Implement a promiseAllSettled function that behaves like the native Promise.allSettled.
The function takes an array of promises (or values) and returns a single Promise that resolves after all inputs have settled (either fulfilled or rejected).
Unlike Promise.all, this function does not short-circuit on rejection. Instead, it waits for every input to complete and returns their outcomes.
{ status: 'fulfilled', value: result }{ status: 'rejected', reason: error }[].