Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That’s not ”raw Promise” syntax, that’s Thenable syntax.

Compare with

    const myPromise = new Promise((resolve, reject) => resolve(”foo”));
    
Afterwards either try-catch await myPromise, or use myPromise.then().catch()


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: