|
6 | 6 | name: WireTyped |
7 | 7 | text: Typed HTTP client for fetch runtimes |
8 | 8 | tagline: Universal fetch-based, typed HTTP client with error-first ergonomics, retries, caching, SSE, and Standard Schema validation. |
9 | | - |
10 | | - <!-- All this to avoid a vue direct package --> |
11 | | - <!-- But at least you read this, so that's fun --> |
12 | | - <div class="wt-hero-badges-wrap"> |
13 | | - <div class="wt-hero-badges-row"> |
14 | | - <a class="wt-hero-badge" href="https://github.com/kasperrt/wiretyped/actions/workflows/ci.yml" target="_blank" rel="noreferrer"> |
15 | | - <img src="https://github.com/kasperrt/wiretyped/actions/workflows/ci.yml/badge.svg" alt="CI" loading="lazy" decoding="async" /> |
16 | | - </a> |
17 | | - <a class="wt-hero-badge" href="https://codecov.io/gh/kasperrt/wiretyped" target="_blank" rel="noreferrer"> |
18 | | - <img src="https://codecov.io/gh/kasperrt/wiretyped/branch/main/graph/badge.svg" alt="Coverage" loading="lazy" decoding="async" /> |
19 | | - </a> |
20 | | - <a class="wt-hero-badge" href="https://bundlejs.com/?q=wiretyped@latest" target="_blank" rel="noreferrer"> |
21 | | - <img src="https://deno.bundlejs.com/badge?q=wiretyped@latest" alt="minzip" loading="lazy" decoding="async" /> |
22 | | - </a> |
23 | | - </div> |
24 | | - <div class="wt-hero-badges-row"> |
25 | | - <a class="wt-hero-badge" href="https://www.npmjs.com/package/wiretyped" target="_blank" rel="noreferrer"> |
26 | | - <img src="https://img.shields.io/npm/v/wiretyped.svg" alt="npm" loading="lazy" decoding="async" /> |
27 | | - </a> |
28 | | - <a class="wt-hero-badge" href="https://jsr.io/@kasperrt/wiretyped" target="_blank" rel="noreferrer"> |
29 | | - <img src="https://jsr.io/badges/@kasperrt/wiretyped" alt="JSR" loading="lazy" decoding="async"> |
30 | | - </a> |
31 | | - </div> |
32 | | - </div> |
33 | 9 |
|
34 | 10 | actions: |
35 | 11 | - theme: brand |
@@ -60,13 +36,20 @@ features: |
60 | 36 |
|
61 | 37 | ## What is it? |
62 | 38 |
|
| 39 | +> Small and easy-to-use fetch based client with runtime validation |
| 40 | +
|
| 41 | + |
| 42 | +[](https://github.com/kasperrt/wiretyped/actions/workflows/ci.yml) [](https://codecov.io/gh/kasperrt/wiretyped) [](https://bundlejs.com/?q=wiretyped@latest) |
| 43 | + |
| 44 | +[](https://www.npmjs.com/package/wiretyped) [](https://jsr.io/@kasperrt/wiretyped) |
| 45 | + |
63 | 46 | WireTyped is a small, composable HTTP client for fetch-based runtimes (browser, Node, Bun, Deno, workers). You define your API as typed endpoint definitions and call it with a consistent, error-first API. |
64 | 47 |
|
65 | | -It has a tiny runtime surface area: one dependency, `@standard-schema/spec`, so you can bring your own validator (Zod, Valibot, ArkType, etc.) without dragging in a whole framework or a pile of transitive deps. |
| 48 | +It keeps a tiny runtime surface area: one dependency, `@standard-schema/spec`, so you can bring your own validator (Zod, Valibot, ArkType, etc.) without dragging in a whole framework or a pile of transitive deps. |
66 | 49 |
|
67 | 50 | I built it because I got tired of the same three problems: surprise runtime errors, wrapping every request in `try/catch`, and threading schemas + type inference through every call just to keep types strict and consistent. WireTyped centralizes that work in your endpoint definitions, so using the client stays predictable and pretty. |
68 | 51 |
|
69 | | -## Quick example |
| 52 | +## Basic example |
70 | 53 |
|
71 | 54 | Define your endpoints once, then call them with a consistent `[err, data]` shape with convenient type-narrowing: |
72 | 55 |
|
@@ -96,6 +79,4 @@ console.log(user.name); |
96 | 79 |
|
97 | 80 | ## Okay, wow |
98 | 81 |
|
99 | | -This is the part where you pause for a second and go: okay, yeah. This is kinda beautiful. Let’s keep going. |
100 | | - |
101 | | -I got you: [`/guide/getting-started`](/guide/getting-started) |
| 82 | +If you’re nodding along and want to keep moving, jump into the quickstart: [`/guide/getting-started`](/guide/getting-started) |
0 commit comments