tbarequest
Version:
A wrapper to fetch data from The Blue Alliance API
4 lines (3 loc) • 308 B
TypeScript
import { Result } from "./utils.js";
import { TBAEndpoint, TBAEndpoints } from "./types/endpoints/index.js";
export declare function createTBACaller(api_key: string): <T extends TBAEndpoint>(endpoint: T, ...args: TBAEndpoints[T]["arguments"]["infer"]) => Promise<Result<TBAEndpoints[T]["schema"]["infer"]>>;