Copilot Tips: TypeScript Types
Published in
2 min readJul 5, 2023
Use Copilot Chat to Generate Interfaces for Objects
Video 🎥
Check out the following YouTube video to learn how to generate types for arbitrary objects returned by fetch.
Summary 📝
- To use this tip, TypeScript developers need to install the Visual Studio Code Insider’s build and GitHub Copilot Chat and Copilot Nightly.
- This tip can be helpful for developers who frequently work with fetch requests and need to generate types for the received objects.
- If you have received an object from a fetch request and need to generate types for it, you can copy the object and ask Copilot to generate an interface for it in the chat.
- Sometimes, you may receive a message saying that your response was filtered, but if you paste the response in your editor, you will see that it is correct.
- Following Working Devs Hero can provide more tips, tricks, and AI news.
Memorable quote: “You can copy the object and ask Copilot to generate an interface for it in the chat.”
In conclusion, TypeScript developers can use this tip to easily generate types for objects received from fetch requests by using the Visual Studio Code Insider’s build and GitHub Copilot Chat and Copilot Nightly. This can save time and improve productivity in their development process.