How do you test complex types with generic?

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
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • react-hook-form

    📋 React Hooks for form state management and validation (Web + React Native)

    We use tsd to test the types of react-hook-form. Example

  • conditional-type-checks

    Types for testing TypeScript types.

    Alternatively, you can use something like conditional-type-checks. You must make sure that your test runner fails on type errors though.

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

  • assertion-types

    Test your types using just the TypeScript compiler and no external tools.

    I made the assertion-types utility for this!

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