Why GitHub Copilot Defaults to 'any' in React TypeScript Projects
typescript
dev.to
There is a pattern that shows up constantly in React TypeScript projects where GitHub Copilot was involved. It looks like this: const [data, setData] = useState(null) const handleResponse = (response: any) => { setData(response.data) } TypeScript is installed. The project is set up correctly. And Copilot still reaches for any — every single time. Why this happens Copilot is not trying to write bad TypeScript. It is taking the path of least resistance. any works. It compile