The response data to assert
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');
}
}
Type assertion that the given data is a valid AmbeedProductStockResponse. Throws if the data does not match the expected structure.