πŸͺ© A fetch client that types itself
github.comΒ·8hΒ·
Discuss: r/node
πŸ”ŒAPI Design
Preview
Report Post

πŸͺ© Discofetch

Discofetch is a type-safe fetch client that automatically discovers and generates TypeScript types for REST APIs that lack OpenAPI specifications. Instead of manually writing types or dealing with any, Discofetch probes your API endpoints at build time and creates a fully-typed fetch client for runtime use with zero overhead.

Features

  • πŸ” Automatic type discovery - No manual type definitions needed
  • πŸ›‘οΈ Full type safety - TypeScript types for paths, parameters, and responses
  • πŸš€ Framework integrations - Built-in support for Vite and Nuxt (more coming soon)
  • 🎯 Runtime validation - Optional Zod schema generation for response validation
  • πŸ”§ Customizable - Hooks for customizing the discovery process
  • ⚑ Build-time generation - Zero runtime ov…

Similar Posts

Loading similar posts...