Overview of Pokenode-ts
mainPokenode-ts is a fully typed PokéAPI client designed with zero runtime dependencies. It is built on native fetch, making it compatible with a wide range of environments including Node.js, Deno, Bun, browsers, and edge runtimes like Cloudflare Workers.
Key capabilities include:
- End-to-end Typing: Every endpoint and field is typed according to the PokéAPI schema.
- Link Resolution: Utilities to resolve
{ name, url }references into full objects usingresolve()orresolveAll(). - Pagination: Built-in support for walking through entire API sections (e.g., all Pokémon) using
paginate(). - Caching: In-memory caching is enabled by default to respect PokéAPI's fair-use policy, with support for custom storage (Redis, KV, localStorage).
- Resilience: Supports opt-in retries with jittered backoff, timeouts, and request cancellation via a
.with()pattern.