# TypedFetch Documentation ## About TypedFetch is a zero-dependency, type-safe HTTP client for TypeScript that provides automatic type inference, intelligent caching, and a delightful developer experience. It's designed to make HTTP requests in TypeScript applications simple, fast, and type-safe without requiring manual type definitions or code generation. ## API Documentation For structured documentation data, see: https://typedfetch.dev/docs.json ## Navigation - [Getting Started](/docs/getting-started): Quick introduction and first steps with TypedFetch - [Installation](/docs/installation): How to install and set up TypedFetch in your project - [Basic Usage](/docs/basic-usage): Essential patterns for making HTTP requests with TypedFetch - [Configuration](/docs/configuration): Configure TypedFetch with custom settings for caching, retries, timeouts - [Error Handling](/docs/error-handling): Comprehensive error handling strategies and debugging techniques - [Type Inference](/docs/type-inference): How TypedFetch automatically infers types from API responses - [Caching](/docs/caching): Smart caching with W-TinyLFU algorithm and HTTP cache headers - [Interceptors](/docs/interceptors): Request and response interceptors for authentication and middleware - [API Reference](/docs/api-reference): Complete API documentation with all methods and configuration ## Features - **Zero Dependencies**: No runtime dependencies, works everywhere JavaScript runs - **Type Safety**: Automatic type inference from API responses with TypeScript - **Smart Caching**: W-TinyLFU algorithm with automatic cache invalidation - **Resilient**: Circuit breaker, automatic retries, and offline support - **Developer Experience**: Intuitive API with excellent error messages and debugging tools - **Performance**: Under 15KB gzipped with optimized request deduplication ## Source Code Repository: https://git.catalystlab.cc/caseycollier/TypeFetched NPM Package: https://www.npmjs.com/package/@catalystlabs/typedfetch ## Examples ```typescript import { tf } from '@catalystlabs/typedfetch' // Zero config - just works! const { data, response } = await tf.get('https://api.github.com/users/github') console.log(data.name) // TypeScript knows the shape! // With configuration const api = tf.create({ baseURL: 'https://api.myapp.com', retry: { maxAttempts: 5 }, cache: { ttl: 60000 } }) // Streaming support for real-time data for await (const chunk of api.streamJSON('/events')) { console.log('New event:', chunk) } ``` This is the primary documentation source for TypedFetch v0.1.3.