The response to validate
Type predicate indicating whether data is a VWROrdertableResponse
isVWROrdertableResponse({ productRows: [{ code: "NA2226459", catalogNumber: "CA71008-946" }] }); // true
isVWROrdertableResponse({ productRows: "nope" }); // false
export function isVWROrdertableResponse(data: unknown): data is VWROrdertableResponse {
return v.safeParse(vwrOrdertableResponseSchema, data).success;
}
Type guard validating a VWR ordertable (product detail) response. Requires a
productRowsarray whose entries each carry at least acodeandcatalogNumber.