Typed fetch client for JavaScript/TypeScript (v0.1.0) that returns tuple results [data, error] for safer error handling. Supports opt-in features like REST, OpenAPI, GraphQL, retry, and request caching. It differentiates from raw fetch and other clients (ky, axios) by providing type-safe responses out of the box and composable modular features. Currently in early development with rapid iteration.
npm install feature-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of featureFetch.get with tuple result for error-first handling.
Always destructure as [error, data].
Use createClient with base config instead of per-call options.
Handle Blob responses explicitly or use .text() method if needed.
Set "module": "ESNext" and "moduleResolution": "node" or "bundler" in tsconfig.json.
Use import { featureFetch } from 'feature-fetch' and ensure project uses ESM.Use clone() on response before retrying or set cache: 'no-store' in request options.
No dependency data recorded yet.