don't cast! parse! a practical guide to schema validation with zod
Abstract
zod (a "TypeScript-first schema validation with static type inference" library) offers useful functions for validating input data against a known schema. this can bring a lot of sanity to typescript (or js) applications. a quick exploration about how network data (e.g. fetch) can be parsed safely so that code written to use that data can rely on a type interface that's validated during runtime (vs. the ill-suited as cast). i'll also showoff some functional-programming-inspired utilities for estimating type interfaces with sample datasets in order to create complex zod schemas quickly.
Talk title
don't cast! parse! a practical guide to schema validation with zod
Abstract
zod (a "TypeScript-first schema validation with static type inference" library) offers useful functions for validating input data against a known schema. this can bring a lot of sanity to typescript (or js) applications. a quick exploration about how network data (e.g.
fetch
) can be parsed safely so that code written to use that data can rely on a type interface that's validated during runtime (vs. the ill-suitedas
cast). i'll also showoff some functional-programming-inspired utilities for estimating type interfaces with sample datasets in order to create complex zod schemas quickly.see also: https://github.com/edwardsharp/estimate-schema/
Your name (and pronouns)
3dwardsharp they/them
Location
NYC
Contact Details
Code of Conduct