ChemPal Documentation - v1.15.1
    Preparing search index...

    Function assertIsAmbeedProductStockResponse

    • Type assertion that the given data is a valid AmbeedProductStockResponse. Throws if the data does not match the expected structure.

      Parameters

      • data: unknown

        The response data to assert

      Returns asserts data is AmbeedProductStockResponse

      Error if the data is not a valid AmbeedProductStockResponse

      assertIsAmbeedProductStockResponse(response);
      console.log(response.value);
      export function assertIsAmbeedProductStockResponse(
      data: unknown,
      ): asserts data is AmbeedProductStockResponse {
      if (!isAmbeedProductStockResponse(data)) {
      throw new Error('assertIsAmbeedProductStockResponse failed');
      }
      }