Type alias ServiceRequestType<ServiceType>

ServiceRequestType<ServiceType>: ServiceType["actions"]["request"] extends ActionCreator<infer ActionPayloadType>
    ? ActionPayloadType
    : never

Infers the type of the service's request, so callers can typecheck their requests.

Type Parameters

  • ServiceType extends Service<any, any, any, any>

Example

`let req: ServiceRequestType<typeof mathService> = // type-checked `