EndpointHandlerinterface
{
readonly endpoint: Endpoint<P, R>;
readonly callback: EndpointCallback<P, R, C>;
}| Property | Type | |
|---|---|---|
.endpoint | Endpoint<P, R> | A typed API resource definition pairing a method and path with payload and result schemas. required readonly |
.callback | EndpointCallback<P, R, C> | A function that handles an endpoint request, receiving a validated payload and returning a result. required readonly |
A typed endpoint definition paired with its implementation callback.
- Created with
Endpoint.handler(); matched and invoked byhandleEndpoints().