Skip to content

resolvePreferredOptions

const resolvePreferredOptions: (options, preferred) => Record<string, string> | null

Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/product/render-state.d.ts:52

Resolve a caller preference (URL query params, a share link) against the product’s real options: keys and values match case-insensitively, unknown keys are ignored, and the result uses the CANONICAL casing so it can key a variant lookup. Null when nothing in preferred matched.

ReadonlyArray<{ name: string; optionValues: ReadonlyArray<{ name: string; }>; }> | undefined

Record<string, string>

Record<string, string> | null