When I see a type assertion like this in TypeScript: fish as Fish I read it...
When I see a type assertion like this in TypeScript:
fish as Fish
I read it as:
fish dangerouslyAssumeThisIsA Fish
Safe alternatives:
1. Create a user-defined type guard (to safely inspect to ensure it meets requirements)
2. Validate at runtime via Zod
Examples:
