#WebStormTip 2019.1: Press Alt-Enter on a function that returns a Promise to convert it to an async function with async/await.
Works in JS, TS, and Flow.
https://blog.jetbrains.com/webstorm/2019/03/webstorm-2019-1/#convert_promise_to_async_await …pic.twitter.com/91SKlqYPTL
-
-
Sure - this function for example https://github.com/PeculiarVentures/CAdES.js/blob/master/src/common.js#L14 …. WebStorm even does not show me "Convert to async" - seems it is too complex to recognize the function returns Promise.
-
Currently we handle only functions directly returning promise chains. Thank you for your sample, created a new issue: https://youtrack.jetbrains.com/issue/WEB-38014 .
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.