An EndpointBuilder instance type.
// Endpoint with body:
type Args = EndpointCallArgs<typeof CreateTodoEndpoint>;
// ^? { body: { title: string; description?: string } }
// Endpoint with path params:
type Args = EndpointCallArgs<typeof GetTodoEndpoint>;
// ^? { params: { id: number } }
// Endpoint with no required args:
type Args = EndpointCallArgs<typeof GetProfileEndpoint>;
// ^? void
Extracts the typed request argument shape from an
EndpointBuilder.The resulting type includes only the keys that carry data:
params— path parameters (when the endpoint usesroute())body— request body (when.body()was called)query— query string parameters (when.query()was called)headers— request headers (when.headers()was called)When no keys are required the type collapses to
voidso the call can be made without arguments:client.users.me().