Optional

db · /index·type

Converts every key of T to optional and nullable. Use to type partial update inputs where any field may be omitted or explicitly cleared to null.

Definition

@nordcom/commerce-db
type Optional = { [K in …]: … };

\{ [K in …]: … \}

Example

import type { Optional, ShopBase } from '@nordcom/commerce-db';
async function patchShop(id: string, patch: Optional<ShopBase>) { /* ... */ }

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme

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

On this page