Eliminating AI Code Hallucinations with TypeScript Compiler Diagnostics and TDD Loops