From 85d3e66bf0ad6b269bab74d554cf6203395c7678 Mon Sep 17 00:00:00 2001 From: Triforce Date: Mon, 4 Jun 2018 01:01:20 -0400 Subject: [PATCH] Added ProductVariant helper namespace --- types/shopify-buy/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/shopify-buy/index.d.ts b/types/shopify-buy/index.d.ts index a62378e437..975b58e233 100644 --- a/types/shopify-buy/index.d.ts +++ b/types/shopify-buy/index.d.ts @@ -37,6 +37,12 @@ declare namespace ShopifyBuy { fetchByHandle(handle: string): Promise; fetchMultiple(ids: string[]): Promise; fetchQuery(query: Query): Promise; + + /* + * Product Helper Namespace + * @see {@link https://shopify.github.io/js-buy-sdk/ProductResource.html} + */ + variantForOptions(product: Product, options: Option): ProductVariant; } export interface CollectionResource { @@ -255,7 +261,7 @@ declare namespace ShopifyBuy { * an Array possible values for option. For instance if this option * is a "Size" option an example value for values could be: ["Large", "Medium", "Small"] */ - values: Array; + values: Array; } export interface OptionValue {