Copilot Tips: Sync/Async
Published in
1 min readAug 11, 2023
Use Copilot Chat to Quickly Refactor Function Signatures
Video 🎥
Check out the following YouTube video to learn how to use GitHub Copilot’s Inline Chat to refactor async function signatures and make them sync or vice versa.
Summary 📝
- To use this tip, TypeScript developers need to instal Visual Studio Code 1.80.1 or newer. — GitHub Copilot and Copilot Chat also need to be installed.
- With Copilot Chat you can easily refactor your code to make an async function synchronous.
- Highlight the code block, hit
cmd + i
to bring up inline chat, and ask Copilot to make the function synchronous. - The tip also mentions that this can be done in reverse, making a synchronous function asynchronous.
- Follow Working Devs Hero for more tips, tricks, and AI news.
Memorable quote: “Generate test data that matches the interface.”
Conclusion: This tip provides a quick and efficient way for TypeScript developers to refactor their code and update function signatures by leveraging Visual Studio Code and Copilot Chat.
Want to Connect?
If you found the information in this tutorial useful please subscribe on Medium, follow @workingdevshero on X, and/or subscribe to the Working Dev's Hero YouTube channel.