Core
RequestEndpoint
Operation returned by defineRequest.
@defjs/core · Type
Signature
type RequestEndpoint< Args extends unknown[], Data, ErrorData, Response extends HttpMeta, > = ( client: Client, ...args: Args ) => Promise< | [error: null, result: Data, response: Response] | [error: FaultOf<ErrorData>, result: undefined, response: undefined] >;
The first argument is a Client. Further arguments are the input, and only the input: none when the definition declares no input, optional when the input struct accepts undefined, and required otherwise. Calling it starts the request and returns the error-first tuple.
Parameters
Prop
Type
client Client...args? Args