This highlights why TypeScript/strongly-typed languages feel like cheating when using AI tools nowadays. Explicit types give the agent a structural map of the data without it having to guess what d or r contains.
Absolutely! TypeScript is basically a cheat code for LLMs. When you give an agent strict types, interfaces, and return types, you’re handing it a literal GPS map of your app. It cuts down hallucination rates dramatically.