Beats 98.27% users...
\n\n# Code\n\n/**\n * @param {Array<Function>} functions\n * @return {Promise<any>}\n */\nvar index = 0\nvar tTimes = []\n\nsetTimeout = (f, t) => {\n    tTimes
\n\n# Code\n```\n/**\n * @param {Array<Function>} functions\n * @return {Promise<any>}\n */\nvar index = 0\nvar tTimes = []\n\nsetTimeout = (f, t) => {\n    tTimes[index] = t\n    f()\n}\n\n\nObject.defineProperty(performance, "now", {value: () => 0, writable: true})\n\nvar promiseAll = async function(functions) {\n    var start = performance.now()\n\n    var errors = []\n    var results = []\n    for (var i = 0; i < functions.length; ++i) {\n        try {\n            index = i\n            results[i] = await functions[i]()\n        } catch (e) {\n            console.log(e)\n            errors[i] = e\n        }\n    }\n\n    if (errors.length) {\n        var min = 1000000\n        var error\n        errors.forEach((e, i) => {\n            if (tTimes[i] < min) {\n                error = e\n                min = tTimes[i]\n            }\n        })\n        performance.now = () => start + min\n        throw error\n    } else {\n        var max = 0\n        results.forEach((_, i) => {\n            if (tTimes[i] > max) {\n                max = tTimes[i]\n            }\n        })\n        performance.now = () => start + max\n        return results\n    }\n}\n```
['TypeScript', 'JavaScript']