What is the difference between :
public myFunction = async (
req: Request,
res: Response
): Promise<Response> => {
return await myOtherFunction()
}
and
public async myFunction (
req: Request,
res: Response
): Promise<Response> {
return await myOtherFunction()
}
I mostly use the first exemple, but when converting a function that is not async, my code editor (vs code) uses the second exemple.
Probably not relevant but I am using typescript 3.1.3