This article explores the concept of runtime type validation in TypeScript and introduces the Zod library as a tool to achieve it. It also discusses the distinction between nominal type systems and structural type systems in TypeScript and provides a workaround to add nominal type support using branded types. Overall, the

4m read time From blog.bitsrc.io
Post cover image
Table of contents
Using branded typesUsing a 3rd party library to add runtime validation
1 Comment

Sort: