Typescript Runtime Validators and DX, a type-checking performance analysis of zod/superstruct/yup/typebox

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • TypeScript-wiki

    A repository to make changes to the TypeScript Wiki on GitHub

    What's prompted me to look at this is my tRPC+Zod editor experience at work has become unusable. 2-3 seconds to just get autocompletion options on a tRPC path, and then another 2-3 for the next path, repeat. When investigated using TypeScript's tracing tools the data entirely points back to my team's Zod DTOs. What I learned is that Zod's performance is okay at the start, but when you start using methods like .extend/.pick/.omit (and so on) the performance regresses in the order of a magnitude. Rather than making this into a "Zod considered bad" post, I wanted to investigate how the alternatives which can be integrated with tRPC fare, and see whether I can do better.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • gapstack

    The missing utilities and tools for React and the Javascript/Typescript ecosystem

    Light Type - an experimental runtime type-checker with feature parity in a number of key areas (and an inspired API) to Zod

  • zod

    TypeScript-first schema validation with static type inference

    Zod 3.20.6

  • Yup

    Dead simple Object schema validation

    Yup 1.0.0

  • Superstruct

    A simple and composable way to validate data in JavaScript (and TypeScript).

    Superstruct 1.0.3

  • typebox

    Json Schema Type Builder with Static Type Resolution for TypeScript

    TypeBox 0.25.21

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Where DRY Applies

    3 projects | news.ycombinator.com | 3 Nov 2023
  • Has anybody used Typia library?

    3 projects | /r/typescript | 27 Jun 2023
  • How can we map data from JSON to typescript object efficiently?

    4 projects | /r/reactjs | 30 Apr 2023
  • ArkType: TypeScript's 1:1 validator, optimized from editor to runtime

    4 projects | news.ycombinator.com | 16 Mar 2023
  • Fastify: Support for Auto Type Inference (similar to TRPC)

    6 projects | /r/typescript | 16 Feb 2023

Did you konow that TypeScript is
the 2nd most popular programming language
based on number of metions?