Examples
Reading open source projects is a great way to learn how to write better code. However, it can be difficult to understand the codebase of a large project. In this book, I will provide examples of code snippets from well-known open-source projects such as Zod, tRPC, Hono, Elysia, and ts-odata-client. I will explain the code and show you how to apply the same patterns to your own projects.
Most Type-safe in the Modern TypeScript libraries use Template Literal Types, you can checkout TypeScript Awesome Template Literal Types which is a curated list of awesome things related to TypeScript Template Literal Types.
Modern TypeScript Libraries
- Zod
- tRPC
- Hono
- Elysia
- ts-odata-client
- hotscript - A library of composable functions for the type-level! Transform your TypeScript types in any way you want using functions you already know.
- zodios
- query-key-factory A library for creating typesafe standardized query keys, useful for cache management in @tanstack/query
- Effect An ecosystem of tools to build robust applications in TypeScript.