I want vscode to warn me when I am calling an async function, but have forgot to await
it.
For example:
const promiseFn: Promise<string> = async () => {
return 'i am an async function';
}
const promiseReturn1 = promiseFn(); // should show a warning
const promiseReturn2 = await promiseFn(); // this is good
I know I can hover over the functions to see if they return promises or whatever, but I want it to be evident at face value.
I have tried setting this up through eslint, ts-eslint, etc. and it’s a giant pain in the behind and doesn’t even work properly.
If there is some extension or other method I can use to do this, I would appreciate it.
1