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

    Function isAmbeedGetPmsSdsByAmsResponse

    • Type guard to validate the webapi/v1/getPmsSdsByAms response shape — the value.sds_list map of per-product (AM id) SDS documents keyed by SDS type.

      Parameters

      • data: unknown

        The response data to validate

      Returns data is AmbeedGetPmsSdsByAmsResponse

      Type predicate indicating if the data is a valid AmbeedGetPmsSdsByAmsResponse

      if (isAmbeedGetPmsSdsByAmsResponse(data)) {
      console.log(data.value.sds_list["A491321"]["am"].url);
      }
      export function isAmbeedGetPmsSdsByAmsResponse(
      data: unknown,
      ): data is AmbeedGetPmsSdsByAmsResponse {
      return v.safeParse(ambeedGetPmsSdsByAmsResponseSchema, data).success;
      }