CommerceProviders

db · /index·type

Literal union of valid commerce provider type strings, constrained to the same set as the runtime CommerceProviders array. Use to type commerceProvider.type parameters in service methods and admin forms without hardcoding string literals.

Definition

@nordcom/commerce-db
type CommerceProviders = typeof CommerceProviders[number];

typeof CommerceProviders[number]

Example

import type { CommerceProviders } from '@nordcom/commerce-db';
function isSupported(type: string): type is CommerceProviders {
    return (CommerceProviders as readonly string[]).includes(type);
}

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme

Sourceshop.ts:67Edit the JSDoc directly
Metadata@nordcom/commerce-db@0.1.0Open in GitHub ↗

On this page