findVariantByOptions
constfindVariantByOptions: <T>(variants,wanted) =>T|null
Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/product/render-state.d.ts:61
The variant whose selectedOptions carry the given values (subset match: unspecified options are free). First exact-subset match wins. Generic so the client element’s narrower Variant shape shares the semantics.
Type Parameters
Section titled “Type Parameters”T extends object
Parameters
Section titled “Parameters”variants
Section titled “variants”readonly T[]
wanted
Section titled “wanted”Record<string, string>
Returns
Section titled “Returns”T | null