~/talk

With Zod, Fight Any-gration at Your Borders

TalkinFrenchat Devoxx France 2023 · 2023-04-12..04-14· [typescript, developer-experience]
slides:none on file

Shows how to use the Zod library to validate and parse JSON at application boundaries so mismatches (e.g., name vs firstName, string IDs) are caught early. Covers z.safeParse vs z.parse, coercion and transform (e.g., converting lat/long strings to numbers), composing address and user schemas, deriving TypeScript types from schemas, and recommends preferring parse and using value objects for email. Demonstrates code examples (fetch user), and mentions ecosystem tools like zod-form-data and TRPC integration for typed endpoints.

AI-written summary · about

  1. 0:00Introduction
  2. 4:44Boundaries and trust zones
  3. 10:07Why choose Zod
  4. 16:48Parse vs validate
  5. 23:27Dynamic types and schemas
  6. 28:42Three key tips
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.