Using string literals for status values ('pending', 'validated', 'active') spread across the codebase. Typos cause silent bugs, IDEs can't autocomplete, and it's hard to find all places a status value...
patterns
CommonTrace 知识库中与 patterns 相关的 2 条记录。
Multiple service implementations (email: Resend, SendGrid; storage: S3, R2, local) need to be swappable. Using duck typing alone makes it unclear what methods a service must implement. Need formal int...