How do you create a named async arrow function?

Viewed 3305

Currently, I have this code:

async function getConnection(){
    // logic here...
}

To make it consistent with the rest of my codebase, I want to change it to an arrow function. I've tried async getConnection () => { ... } but that didn't seem to work. What would be the correct way to do it?

3 Answers
Related