@httpc/kit
Version:
httpc toolbox for building function-based API with minimal code and end-to-end type safety
15 lines (14 loc) • 1.03 kB
TypeScript
import { HttpCServerMiddleware, HttpCallMetadata, HttpCallAccess, HttpCServerTester } from "@httpc/server";
export type ApplicationTesterOptions = {
middlewares?: HttpCServerMiddleware[];
};
export declare class ApplicationTester {
protected options?: ApplicationTesterOptions | undefined;
protected server: HttpCServerTester;
constructor(options?: ApplicationTesterOptions | undefined);
initialize(): Promise<void>;
newCall(): import("@httpc/server").CallBuilder;
createCall<T extends (...args: any) => any>(...pipeline: [...(HttpCServerMiddleware | HttpCallMetadata)[], T]): (...args: Parameters<T>) => Promise<Awaited<ReturnType<T>>>;
createCall<T extends (...args: any) => any>(access: HttpCallAccess, ...pipeline: [...(HttpCServerMiddleware | HttpCallMetadata)[], T]): (...args: Parameters<T>) => Promise<Awaited<ReturnType<T>>>;
runCall<T extends () => (any | Promise<any>)>(...pipeline: [...(HttpCServerMiddleware | HttpCallMetadata)[], T]): Promise<Awaited<ReturnType<T>>>;
}