Automatically generating typeguard functions

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. ts-auto-guard

    Generate type guard functions from TypeScript interfaces

    One thing I did realise after looking at your code was that I could try changing the attributes property to a Record and see if https://github.com/rhys-vdw/ts-auto-guard handled that well, which it did!

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. io-ts

    Runtime type system for IO decoding/encoding

    I've also looked at https://github.com/gcanti/io-ts and https://github.com/pelotom/runtypes but both have a manual step converting the types into a runtime representiation by hand which I'd like to avoid.

  4. runtypes

    Runtime validation for static types

    I've also looked at https://github.com/gcanti/io-ts and https://github.com/pelotom/runtypes but both have a manual step converting the types into a runtime representiation by hand which I'd like to avoid.

  5. io-ts-transformer

    TypeScript transformer which converts TypeScript types to io-ts entities

    You can use the plugin https://github.com/awerlogus/io-ts-transformer with https://github.com/cevek/ttypescript to get compile time generation of io-ts codecs as well.

  6. ttypescript

    Over TypeScript tool to use custom transformers in the tsconfig.json

    You can use the plugin https://github.com/awerlogus/io-ts-transformer with https://github.com/cevek/ttypescript to get compile time generation of io-ts codecs as well.

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

  • TDD

    2 projects | /r/CharruaDevs | 7 Dec 2023
  • Why I Like Using Maps (and WeakMaps) for Handling DOM Nodes

    1 project | news.ycombinator.com | 6 May 2023
  • how to strictly type this?

    1 project | /r/typescript | 19 Nov 2022
  • Notes on Advanced TypeScript: Runtime Validations

    2 projects | dev.to | 4 May 2022
  • Announcing TypeScript 4.6

    1 project | /r/javascript | 2 Mar 2022