@ube-tsp/ky-client
v0.1.2
Published
A Ky-based HTTP client generator that consumes TypeScript types from @ube-tsp/ky-emitter
Maintainers
Readme
@ube-tsp/ky-client
Type-safe HTTP client generator using Ky that transforms operation maps into nested client methods.
Usage
import ky from "ky";
import { createClient } from "@ube-tsp/ky-client";
import { operationMap, type OperationMap } from "./generated/operation-map.js";
const kyInstance = ky.create({ prefixUrl: "https://api.example.com" });
const client = createClient<OperationMap>(kyInstance, operationMap);
// Use nested methods
await client.PetStore.getPet({ params: { path: { petId: 123 } } });npm install @ube-tsp/ky-client kyLicense
MIT
