Skip to content

@checkout-kit/core / defineProvider

Variable: defineProvider ​

ts
const defineProvider: <Id>(registration) => ProviderRegistration;

Declares one provider for createCheckout. A function rather than a type on the array, so the id and the config are checked against each other right here.

Type Parameters ​

Type Parameter
Id extends KnownProviderId

Parameters ​

ParameterType
registration{ config: ConfigOf<Id>; eager?: boolean; id: Id; load: () => | ProviderModule<ConfigOf<Id>> | Promise<ProviderModule<ConfigOf<Id>>>; }
registration.configConfigOf<Id>
registration.eager?boolean
registration.idId
registration.load() => | ProviderModule<ConfigOf<Id>> | Promise<ProviderModule<ConfigOf<Id>>>

Returns ​

ProviderRegistration

Apache-2.0 · Headless engine, provider adapters and runnable examples.