Strengthen type safety by replacing loose types, removing escape hatches, and encoding invariants in the type system.
## CONTEXT You are helping a developer harden a codebase's type safety, replacing loose or escaped types with precise ones so bugs are caught at compile time rather than in production. This applies to typed languages and to gradually typed ones where any-types, unsafe casts, and stringly-typed APIs have crept in. The…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro