VS Code: Automatically convert your Promise chains into async/awaitLast updated: 20th July 2020
Visual Studio Code can now convert your long chains of
In theory, this should also work with Sublime Text when using the TypeScript plugin.
How to use this feature
- Focus on some code which uses
.then()with Promise related code
- Click the lightbulb icon which appears in the line gutter
- Select 'Convert to async function'
I made a tip on how VS Code can convert your require statements into ES Module Imports.
_You can also check out this Twitter thread which includes some extra information.