Alokai
You are reading the documentation for connect v1, which is no longer the latest version. Switch to connect v2

WithoutContext

Removes the context from the methods of an API Client. context is an internal parameter added by the Server Middleware to the methods of the API Client. Removing it allows to define the contract of the endpoints exposed by the Server Middleware.

export type WithoutContext<Methods extends ApiMethods> = {
    [T in keyof Methods]: Methods[T] extends (context: any, ...arguments_: infer P) => infer R ? (...arguments_: P) => R : never;
};

Referenced Types

On this page