How to Troubleshoot Types?

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

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TypeScript itself feels like a language with some complexity. It's forced me mentally to think in terms of sets where I never really did that before while coding, unless I was using some data structure / operation that is defined in terms of sets. TS has recursion and is Turing complete. That was kind of mind blowing to me to discover.

  • type-fest

    A collection of essential TypeScript types

  • To formalize it, you can write type tests (yes, types can be tested! A failing test is a compiler error. You can also test the negative case, using // @ts-expect-error ). If you want to see how types are tested, check out some open source projects like type-fest.

  • 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
  • ts-ast-viewer

    TypeScript AST viewer.

  • You can check ast-viewer Consider this example: typescript type Result = keyof HTMLDivElement Click in ast viewer on Result type, you will see something like that: Type keyof HTMLDivElement ... value:"align" value:"addEventListener" value:"removeEventListener" ... If you want to have more control over AST, you can check ts-ast-viewer repo

  • tsafe

    🔩 The missing TypeScript utils

  • Hi, Checkout tsafe. It enables to test types definition. Checkout this GIF in particular. Let's say for example that we have an objectFromEntries function and we want to test it typewise, we can do: ```typescript import { objectEntries } from "../myObjectFromEntries"; import { assert } from "tsafe";

  • tss-react

    ✨ Dynamic CSS-in-TS solution, based on Emotion

  • Real-life examples: 1, 2, 3

  • clean-architecture

    📐 A clean architecture framework

  • Real-life examples: 1, 2, 3

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