Check types at the top level or in each function?

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • zod

    TypeScript-first schema validation with static type inference

  • I guess if you studying about this, it's cool way, but if you want use in your application i recommend use some library like zod (https://github.com/colinhacks/zod). There are some functionalities that make your work easily. But this is not a rule, just a suggestion.

  • runtypes

    Runtime validation for static types

  • I wouldn't reinvent the wheel: https://github.com/pelotom/runtypes

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • io-ts

    Runtime type system for IO decoding/encoding

  • There's also libraries that will generate the parsing functions for you like io-ts or zod that could be interesting to look into

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