8hob@programming.dev to TypeScript@programming.devEnglish · 2 years agoA Type-Safer Alternative to Type Guards in TypeScript8hob.ioexternal-linkmessage-square2linkfedilinkarrow-up110arrow-down11file-text
arrow-up19arrow-down1external-linkA Type-Safer Alternative to Type Guards in TypeScript8hob.io8hob@programming.dev to TypeScript@programming.devEnglish · 2 years agomessage-square2linkfedilinkfile-text
minus-squaresloppy_diffuser@sh.itjust.workslinkfedilinkEnglisharrow-up1·2 years agoThere are libraries that do just this like https://effect.website/docs/guides/schema/introduction. Appreciate the write up though! All too easy to rely on libraries without understanding what’s under the hood. Thanks for sharing, it was a good read.
minus-square8hob@programming.devOPlinkfedilinkEnglisharrow-up2·2 years agoUsing a third-party library when it’s applicable definitely works. Much of this post is for those who can’t add a heavy dependency :)
There are libraries that do just this like https://effect.website/docs/guides/schema/introduction.
Appreciate the write up though! All too easy to rely on libraries without understanding what’s under the hood.
Thanks for sharing, it was a good read.
Using a third-party library when it’s applicable definitely works. Much of this post is for those who can’t add a heavy dependency :)