The response to validate
Type predicate indicating whether data is a VWRSpecificationResponse
isVWRSpecificationResponse([{ name: "Purity", result: "> 98 %" }]); // true
isVWRSpecificationResponse({ name: "Purity" }); // false (not an array)
export function isVWRSpecificationResponse(data: unknown): data is VWRSpecificationResponse {
return v.safeParse(vwrSpecificationResponseSchema, data).success;
}
Type guard validating a VWR chemical specification response (a flat array of
{name, result}).