UNPKG

ctan

Version:

CTAN (Comprehensive TeX Archive Network) API client for Node.js

13 lines (12 loc) 667 B
import { type JSONSchemaType } from 'ajv'; import type { ClientConfig } from "./config.js"; export declare abstract class ClientBase { #private; constructor(base?: Readonly<ClientConfig> | ClientBase); get defaults(): ClientConfig; protected get<Response>(endpoint: string, params: Readonly<URLSearchParams> | null, schema: Readonly<JSONSchemaType<Response>>, config?: Readonly<ClientConfig>): Promise<Response>; } export declare function buildParams<T extends object>(data: Readonly<T> | undefined | null, keys: ReadonlyArray<keyof T & string>, coerce?: { [K in keyof T]?: (from: T[K]) => unknown; }): URLSearchParams; export default ClientBase;