import { endpointResponse } from "https://deno.land/x/cav@0.0.21/mod.ts";
Creates an EndpointResponse from the provided body, which is serialized using the top-level serializeBody function. If the provided body is already a Response object, it will be returned with the init headers applied (if there are any). In that case, the status and statusText init options will be ignored. Extra serializers can be used to extend the data types that can be serialized.
Parameters
body: T
optional
init: EndpointResponseInitReturns
EndpointResponse<T extends EndpointResponse<infer T2> ? T2 : T extends Response ? unknown : T>