Skip to content

ui-router-server / fetch / ServeResponse

Type Alias: ServeResponse<Args> ​

ts
type ServeResponse<Args> = (verdict, request, ...args) => 
  | Response
| Promise<Response>;

Defined in: fetch.ts:178

Answers a request whose pathname matched a response state, handed the verdict, the original request and the arguments the adapter was called with. Run the state's transition and its bound handler here (for example through lit-ui-router-ssr); its Response goes out untouched.

Type Parameters ​

Type ParameterDefault type
Args extends unknown[][]

Parameters ​

ParameterType
verdictExtract<Verdict, { kind: "response"; }>
requestRequest
...argsArgs

Returns ​

| Response | Promise<Response>