export const TransformedSchema = ProductsSchema.pipe(Schema.transform(Schema.Struct({
id: ProductIdBrand,
name: Schema.String,
price: Schema.String,
image: Schema.URL,
category: Schema.String,
description: Schema.String
}), {
decode: (productsArray, id: ProductId) => productsArray.filter(product => product.id === id)[0]
}
export const TransformedSchema = ProductsSchema.pipe(Schema.transform(Schema.Struct({
id: ProductIdBrand,
name: Schema.String,
price: Schema.String,
image: Schema.URL,
category: Schema.String,
description: Schema.String
}), {
decode: (productsArray, id: ProductId) => productsArray.filter(product => product.id === id)[0]
}