Learn how to unleash the full potential of the type system of TypeScript

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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-eslint

    :sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript

  • This is a point of confusion for many developers, who think it means 'any object type'.

    https://github.com/typescript-eslint/typescript-eslint/blob/...

  • 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
  • type-challenges

    Collection of TypeScript type challenges with online judge

  • Wow I think I know a lot of Typescript but I'll have to go through it because I'm always asked for ressources to get started and this one seem great.

    I also recommend type-challenges: https://github.com/type-challenges/type-challenges

    It works great with the VSCode extension.

  • Visual Studio Code

    Visual Studio Code

  • I wish this issue would get addressed: https://github.com/microsoft/vscode/issues/94679

    Showing fully resolved types in Intellisense would be the single largest usability enhancement they could make for me right now..

  • zod

    TypeScript-first schema validation with static type inference

  • fp-ts [0] and the accompanying io-ts [1] are very well designed and neatly implemented. I'd consider them the reference for all things FP in Typescript.

    In practice though I find that they don't mesh well with the language and ecosystem at large. Using them in a React/Vue/Whatever app will catch you at every step, as neither the language nor the frameworks have these principles at their core. It takes a lot of effort to escape from their gravitational pull. Using Zod [2] for your parsing needs and strict TS settings for the rest feel more natural.

    It could work in a framework-agnostic backend or logic-heavy codebase where the majority of the devs are in to FP and really want / have to use Typescript.

    0 - https://gcanti.github.io/fp-ts/

    1 - https://gcanti.github.io/io-ts/

    2 - https://zod.dev

  • io-ts

    Runtime type system for IO decoding/encoding

  • fp-ts [0] and the accompanying io-ts [1] are very well designed and neatly implemented. I'd consider them the reference for all things FP in Typescript.

    In practice though I find that they don't mesh well with the language and ecosystem at large. Using them in a React/Vue/Whatever app will catch you at every step, as neither the language nor the frameworks have these principles at their core. It takes a lot of effort to escape from their gravitational pull. Using Zod [2] for your parsing needs and strict TS settings for the rest feel more natural.

    It could work in a framework-agnostic backend or logic-heavy codebase where the majority of the devs are in to FP and really want / have to use Typescript.

    0 - https://gcanti.github.io/fp-ts/

    1 - https://gcanti.github.io/io-ts/

    2 - https://zod.dev

  • fp-ts

    Functional programming in TypeScript

  • fp-ts [0] and the accompanying io-ts [1] are very well designed and neatly implemented. I'd consider them the reference for all things FP in Typescript.

    In practice though I find that they don't mesh well with the language and ecosystem at large. Using them in a React/Vue/Whatever app will catch you at every step, as neither the language nor the frameworks have these principles at their core. It takes a lot of effort to escape from their gravitational pull. Using Zod [2] for your parsing needs and strict TS settings for the rest feel more natural.

    It could work in a framework-agnostic backend or logic-heavy codebase where the majority of the devs are in to FP and really want / have to use Typescript.

    0 - https://gcanti.github.io/fp-ts/

    1 - https://gcanti.github.io/io-ts/

    2 - https://zod.dev

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • marshal.ts

    A new full-featured and high-performance TypeScript framework

  • You might be interested in DeepKit[0]. In short, it enables introspection/reflection of typescript types at runtime, and builds off of that to do super interesting things like an ORM, an API framework, ... etc.

    [0] https://deepkit.io/

  • DefinitelyTyped

    The repository for high quality TypeScript type definitions. (by googol)

  • Yes, that's correct... compose() pipes a bunch of passed functions from right to left. Here's the actual type definition if you want to see: https://github.com/googol/DefinitelyTyped/blob/6836f798cb186...

    But even at its simplest variant, with just one or two functions passed, what the V0 or T1 do is pretty confusing. I thiiiiiiiiink it's trying to ensure the return type of one function is correctly passed as the input type of the subsequent function, and so on and so forth, but I don't really know.

    Also, I should note that I'm using an older version of that lib. The latest version has cleaner typings... still difficult, but at least formatted better: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/mast...

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