queerjs / queerjs-talk-proposals

Interested in speaking at an upcoming QueerJS? Submit a talk here.
13 stars 3 forks source link

Talk proposal: don't cast! parse! a practical guide to schema validation with zod #60

Open edwardsharp opened 5 months ago

edwardsharp commented 5 months ago

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-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.

see also: https://github.com/edwardsharp/estimate-schema/

Your name (and pronouns)

3dwardsharp they/them

Location

NYC

Contact Details

Code of Conduct

dontcastparse