VS Code: Easy Refactoring!

preview_player
Показать описание

These days I love using async await for promises instead of chaining .thens in JavaScript.

What if you come across an older code base that has a bunch of functions with .thens and .catches.

And you would just love to convert all of those to async await, but that would take forever, right?!

Actually, it’s pretty easy. Just select the function and either click the lightbulb or press Ctrl+. and choose “convert to async function”.

It even includes a try / catch. Couldn’t get any easier than that!
_____________________________________

🛠️ Tools I use:
_____________________________________

💖 Show support!
_____________________________________

👀 Watch Next:
_____________________________________

🌐 Connect With Me:
_____________________________________

** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

#codeSTACKr #vscode #learntocode
Рекомендации по теме
Комментарии
Автор

Your stylized 'return' makes me want to die

deepPeen
Автор

How to change the cursor colour in vscode?

brosai
Автор

Spill your extension using for vscode interface like this pls

alwiismail