typehero.dev is a really well crafted website to learn advanced typescript.
It's 94 contributors... can't beleave so many ts wizards did it (lead by @trashh_dev).
A Masterpeace!
📢 Typescript tip for day 8 of #AdventOfTypescript
1⃣ For those knowing about utility types, day 8 was easy. Just use Omit
🔗typescriptlang.org/docs/handbook/…
2⃣ For those reinventing the wheel, you learned about Mapped Keys can also filter objects
Your chances to get a duplicate is 1 in the lifetime of the universe. And if you are concerned, roll your inserts in transactions so that they'll run again in case of failure.
UUID are good for distributed databases, for preventing predictable attacks, to allow parrallelism.
A lot of typescript wizards don't know this, but there is a way in typescript to do High Order Kinded Types:
@mattpocockuk maybe a video about this would be cool
📢 How to build a fully typesafe API with @EffectTS_ and effect-http
- Request and Response validation and type checking
- Logging
- OpenTelemetry
- Auto generated OpenAPI
- Database
👇
📢 Happy to announce that i'm now part of @EffectTS_ open source team core members.
I'll help maintain the sql subset packages i contributed to.
I'd like to thank @thefubhy and @MichaelArnaldi and the rest of effect team for welcoming me in this amazing project.
I would not say it's by the book. You have too much repetition allowing for errors everywhere.
Use your data as a single source of truth. Bonus, code is easier to read and maintain : tsplay.dev/m0VjDw
The best advice i can give you is stop micro managing your team.
Do not review unless explicitly asked for.
Let your team review each other ones PR and give them your trust.
Even better, stop doing PRs and ask your team to do Peer programming.
Woops! Despite doing everything by the books and not using any escape hatches ('as', 'any', or 'non-null assertions') TypeScript let us give a normal 'member' admin permissions! 💥
📢 Typescript tip for day 9 of #AdventOfTypescript
1⃣ You may have learned that typescript utility types can do recursion.
2⃣ recursion on types has a limit
3⃣ Solution : use Tail Recursion Optimisation
🔗 typescriptlang.org/docs/handbook/…
📢I plan to do some @EffectTS_ feedback in the coming weeks in the form of blog posts Effect/XXX vs YYY.
Examples:
- Effect/schema vs Zod
- Effect/rpc vs tRPC
Please propose some topics and i'll add them to my todo list👇