Client

type Client<TSelf> = TSelf & object;

A client that can be extended with plugins.

The Client type represents a client object that can be built up through the application of one or more plugins. It provides a use method to apply plugins, either synchronously (returning a new Client) or asynchronously (returning an AsyncClient).

Type Declaration

NameTypeDescription
use()<TOutput>(plugin) => TOutput extends Promise<infer U> ? AsyncClient<U extends object ? U : never> : Client<TOutput>Applies a plugin to extend or transform the client.

Type Parameters

Type ParameterDescription
TSelf extends objectThe current shape of the client object including all applied plugins.

On this page