UNPKG

@httpc/kit

Version:

httpc toolbox for building function-based API with minimal code and end-to-end type safety

7 lines (6 loc) 343 B
import { HttpCallPipelineDefinition, CallHandler } from "@httpc/server"; import { Constructor } from "../di"; export type HttpControllerCalls<T> = { [k in keyof T]: T[k] extends CallHandler ? HttpCallPipelineDefinition<T[k]> : never; }; export declare function httpController<T>(constructor: Constructor<T>): HttpControllerCalls<T>;