Validates that a response matches the ProductResponse interface structure
Response object to validate
Type predicate indicating if object is a valid ProductResponse
const response = await this.httpGetJson({ path: `/api/rest/cb/product/product-details/${productId}`});if (isValidProductResponse(response)) { // Process valid product response console.log(response.product.name);} Copy
const response = await this.httpGetJson({ path: `/api/rest/cb/product/product-details/${productId}`});if (isValidProductResponse(response)) { // Process valid product response console.log(response.product.name);}
Validates that a response matches the ProductResponse interface structure