@colinhacks ("Colin McDonnell") wrote:
1. If you can trust the type signature of what you're returning (e.g. an ORM result) you should rely on inference — anything else isn't DRY
2. If you can't, validate it w/ Zod, etc. You can now trust the type signature of what you're returning. See #1.
with quote tweet:
I hate this.
I hate this so much.
Not specifying a return type is an anti pattern that people who copium'ing hard with typescript
1. if you don't say what you are returning you can return the wrong thing and typescript is fine with it
... (next tweet) https://twitter.com/ParasocialFix/status/1620805540715851778