1

Is there more elegant way to return a part of object props? It's a bit awkward to type props twice.

(async() => {

    let { id, status, type, name, format } = await Gimme();
    // Promise returns { id, status, type, name, format, width, height, size, ratio, ext }

    return { id, status, type, name, format };

})()
Mike Dope
  • 43
  • 2

0 Answers0