4.3.3
·
338 commits
to master
since this release
Fixed
Bug where type parameters are wrong on models that have properties that are complex types that have their own type parameters. An example of this is OrderWorksheet
Previously:
export interface OrderWorksheet<TFromUserXp = any, TBillingAddressXp = any, TOrderXp = any, TProductXp = any, TVariantXp = any, TShippingAddressXp = any, TShipFromAddressXp = any, TLineItemsXp = any, TShipEstimatesXp = any, TShipEstimateResponseXp = any, TOrderCalculateResponseXp = any, TOrderSubmitResponseXp = any, TOrderSubmitForApprovalResponseXp = any, TOrderApprovedResponseXp = any> {
Order?: Order<TOrderXp,TFromUserXp,TBillingAddressXp>
LineItems?: LineItem<TProductXp,TVariantXp,TShippingAddressXp,TShipFromAddressXp, TLineItemsXp>[]
ShipEstimateResponse?: ShipEstimateResponse<TShipEstimateResponseXp,TShipEstimatesXp>
OrderCalculateResponse?: OrderCalculateResponse<TOrderCalculateResponseXp>
OrderSubmitResponse?: OrderSubmitResponse<TOrderSubmitResponseXp>
OrderSubmitForApprovalResponse?: OrderSubmitForApprovalResponse<TOrderSubmitForApprovalResponseXp>
OrderApprovedResponse?: OrderApprovedResponse<TOrderApprovedResponseXp>
}Note that the LineItems property is defined as a LineItem with LineItemsXp as the last type parameter. This is wrong, it should actually be the first one so that it matches the type parameters expected by LineItem