Skip to main content Link Search Menu Expand Document (external link)

MockClient overview

Client implementation derivation for testing purposes.

Added in v1.0.0


Table of contents


constructors

make

Derive mock client implementation from the Api

Signature

export declare const make: <A extends Api.Api.Any>(
  api: A,
  option?: Partial<Options<A>> | undefined
) => Simplify<{ [Id in Api.Api.Ids<A>]: Client.EndpointClient<Api.Api.EndpointById<A, Id>> }>

Added in v1.0.0

models

Options (type alias)

Signature

export type Options<A extends Api.Api.Any> = {
  responses: {
    [Id in Api.Api.Ids<A>]: Client.ClientFunctionResponse<ApiEndpoint.ApiEndpoint.Response<Api.Api.EndpointById<A, Id>>>
  }
}

Added in v1.0.0