If you only have one await , and don't do anything after that await, you can just omit async / await inside the method.
then it would look like this:
functiongetPromise(){// stuff beforeconstneededSomething=42;returngetSomethingThatReturnsOnlyPromises(neededSomething);}// the method that uses getPromiseconstsomething=awaitgetPromise();
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you only have one
await
, and don't do anything after thatawait
, you can just omitasync
/await
inside the method.then it would look like this: