TypeScript has become the default for serious JavaScript development, and the best libraries are now designed TypeScript-first — not with types bolted on as an afterthought. At GEXP Software, every project starts with TypeScript and we select libraries that leverage the type system fully. These are the packages that make TypeScript development a joy.
01Validation & Schemas
Libraries for runtime validation, schema definition, and type inference that bridge the gap between TypeScript types and runtime checks.
Zod
open-sourceThe most popular TypeScript-first schema validation library. Define schemas once and automatically infer TypeScript types from them — no duplication between runtime checks and compile-time types.
Define once, get both runtime validation and TypeScript types
Valibot
open-sourceModular validation library that's up to 98% smaller than Zod through tree-shaking. Each validation function is a separate import, so you only ship what you use.
Same DX as Zod at a fraction of the bundle size
ArkType
open-sourceRuntime validation with syntax that mirrors TypeScript's own type syntax. Write validation schemas that look like TypeScript types — dramatically lower learning curve for TypeScript developers.
Validation syntax that mirrors TypeScript type syntax
TypeBox
open-sourceJSON Schema builder with TypeScript type inference. Creates JSON Schema-compliant validators that work with standard JSON Schema tools while providing full TypeScript types.
Effect Schema
open-sourceSchema validation from the Effect ecosystem with bidirectional transformations — encode and decode data between runtime and domain types. Integrates with Effect's error handling and composition.
02Type Utilities & Helpers
Libraries that extend TypeScript's type system with advanced utility types, type guards, and compile-time helpers.
ts-pattern
open-sourceExhaustive pattern matching for TypeScript that brings ML-style match expressions to your code. Handle every case of a discriminated union with compile-time exhaustiveness checking.
Exhaustive pattern matching with compile-time guarantees
type-fest
open-sourceCollection of 200+ essential TypeScript utility types that extend the built-in ones. Includes types like `SetRequired`, `PartialDeep`, `Jsonify`, and `Simplify` that you'll use everywhere.
200+ utility types that fill gaps in TypeScript's built-in types
ts-reset
open-sourceFixes TypeScript's built-in type definitions to be stricter and more useful. Makes `.json()` return `unknown` instead of `any`, `.filter(Boolean)` properly narrows types, and more.
Fixes .json() returning any and .filter(Boolean) not narrowing
tiny-invariant
open-sourceTiny assertion function that narrows TypeScript types at runtime. Assert that a value is truthy and TypeScript narrows the type for all subsequent code — cleaner than manual type guards.
ts-essentials
open-sourceAll essential TypeScript types in one place — DeepReadonly, DeepPartial, DeepRequired, Opaque types, and branded types. Complements type-fest with different advanced type patterns.
03Error Handling & Control Flow
Libraries for structured error handling, result types, and functional control flow in TypeScript applications.
Effect
open-sourceA comprehensive TypeScript framework for building reliable, composable applications. Provides typed errors, dependency injection, concurrency, streaming, and observability in a unified system.
Typed errors + DI + concurrency in one coherent system
neverthrow
open-sourceResult type implementation for TypeScript that makes error handling explicit. Functions return `Result<T, E>` instead of throwing, forcing callers to handle both success and failure cases.
Forces explicit error handling — no more uncaught exceptions
ts-results
open-sourceRust-inspired Result and Option types for TypeScript. Brings Rust's error handling ergonomics to TypeScript with `.map()`, `.andThen()`, and `.unwrapOr()` for clean error chaining.
Zod Error
open-sourceUtility for creating human-readable error messages from Zod validation failures. Transforms nested Zod errors into clean, user-facing messages suitable for form displays.
p-* utilities (p-limit, p-retry, p-queue)
open-sourceCollection of promise utility modules for controlling concurrency, adding retries, and managing async queues. Each module is tiny and focused — import only the async pattern you need.
04HTTP & API Clients
Type-safe HTTP clients and API integration libraries designed for TypeScript applications.
tRPC
open-sourceEnd-to-end type-safe APIs where the server defines procedures and the client gets full autocompletion without code generation. Change a server response type and the client immediately shows type errors.
Change server types and client code instantly shows errors
openapi-typescript
open-sourceGenerates TypeScript types from OpenAPI 3.x schemas with zero runtime overhead. Pair with openapi-fetch for a fully type-safe HTTP client generated from your API spec.
Generate types from OpenAPI specs with zero runtime cost
Ky
open-sourceTiny, elegant HTTP client built on the Fetch API with retry logic, timeout handling, and JSON parsing. Like a modern, TypeScript-first alternative to Axios without the bloat.
Zodios
open-sourceType-safe API client that uses Zod schemas to validate both request and response data at runtime. Define your API contract once and get type-safe requests with runtime validation.
Hono Client
open-sourceType-safe RPC client for Hono APIs that shares types between server and client. Similar to tRPC but for Hono's web framework, giving end-to-end type safety with zero code generation.
oRPC
open-sourceEnd-to-end type-safe APIs built on web standards with OpenAPI compatibility. Combines tRPC's developer experience with REST-friendly output that generates OpenAPI documentation automatically.
tRPC-like DX with automatic OpenAPI spec generation
05Data & Utility Libraries
General-purpose TypeScript utility libraries for data manipulation, functional programming, and common operations.
Remeda
open-sourceTypeScript-first utility library designed as a modern Lodash alternative. Every function is fully typed, tree-shakeable, and supports both data-first and data-last (pipe) calling styles.
Lodash alternative with perfect TypeScript types and pipe support
Temporal (tc39 proposal / polyfill)
open-sourceThe upcoming standard for date/time handling in JavaScript with a proper TypeScript API. Use the polyfill now to get immutable, timezone-aware date operations that will become a language standard.
nanoid
open-sourceTiny, secure, URL-friendly unique string ID generator. At 130 bytes, it's 60% smaller than UUID while generating IDs with equal or better collision resistance.
superjson
open-sourceSerializes JavaScript values that JSON.stringify can't handle — Date, Map, Set, BigInt, RegExp, and more. Essential for sending rich data types between server and client in full-stack TypeScript apps.
Serialize Date, Map, Set, BigInt — everything JSON can't
devalue
open-sourceLike JSON.stringify but handles cyclical references, Maps, Sets, Dates, RegExps, and BigInts. Used by SvelteKit for serializing server data — smaller output than superjson.
typeschema
open-sourceUniversal adapter for TypeScript validation libraries — use Zod, Yup, ArkType, Valibot, or any other validator through a single interface. Swap validation libraries without changing your code.
Swap between Zod, Valibot, ArkType without code changes