...

hdjrudni

279

Karma

2018-07-18

Created

Recent Activity

  • That's an easy fix if you wait for the slowest one and pop them both in at the same time, no?

  • That's unfortunate because I have a bunch of photos with handwritten German on the back that I need to transcribe, and seeing as that I can't read German I can't really do it by myself either.

  • If it's what I'm thinking, that one isn't too bad. I wrote it awhile back:

        export async function promiseAll<T extends Record<string, Promise<any>>>(promises: T): Promise<{ [K in keyof T]: Awaited<T[K]> }> {
            const keys = Object.keys(promises) as Array<keyof T>;
            const result = await Promise.all(keys.map(key => promises[key]));
            return Object.fromEntries(result.map((value, i) => [keys[i], value])) as { [K in keyof T]: Awaited<T[K]> };

  • Past-me was so dumb. Asked a lot of rookie questions. It's the one little piece of evidence that maybe I have actually learned a little something in the past 10 years.

  • That comic doesn't appear to be dated but I'm sure it's been at least 5 years, so that checks out.

HackerNews