ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Namespace magento2

    Functions - Typeguards

    isMagento2Money

    Type guard to validate if an object is a valid Magento 2 Money payload. Verifies that both the numeric value and ISO currency string are present.

    isMagento2ProductItem

    Type guard to validate if an object is a valid Magento 2 product item from a products.items array. Tolerant of optional/nullable fields so partial data (missing descriptions, images, etc.) still validates.

    isValidMagento2SearchResponse

    Type guard to validate that a response from the Magento 2 GraphQL products query matches the expected Magento2SearchResponse shape. Logs the parse failure via console.warn to aid debugging mismatched schemas.