AI can benefit significantly from type checking. This provides a minimal-setup-required feedback loop that it can use to address errors. User defined types are also a greppable “what do I need to look at in this codebase to implement feature X?” signal, and serve as a means of hinting what you want the AI to change without writing code (stub out some functions and/or refer to new nonexistent types rather than writing prose for some parts of your spec).