How I Fixed: unresolved variable or type await

Ok, super easy one here, but as a newbie to  async /  await this did catch me out.

Let’s pretend we have a function:

This will present an error in WebStorm, and Googling came up only with a bug report from 2015.

In my case, WebStorm would give two different error messages:

webstorm-async-await-expecting-newline-or-semicolon

orwebstorm-async-await-unresolved-variable-or-type-await

Ready to kick yourself?

This I tell you brother, you can’t have one without the other 🙂

 

Shares

Published by

Code Review

Code Review

CodeReviewVideos is a video training site helping software developers learn Symfony faster and easier.

Leave a Reply

Your email address will not be published. Required fields are marked *