Schema Decoding with External Parameters in Effect Typescript
Can a schema decoding rely on another paramter other than the Input schema? I believe what I want to do would be a one-way schema transformation, which is basically I have an Array(Product) => Product, and I need to filter the product array by Id. Then I should be able to transform the keys of the Product if I want to, right?
Or would it make more sense to have a Schema transformation defined on the Product schema itself...i think that makes more sense also.
So - can I have something like:
where
Or would it make more sense to have a Schema transformation defined on the Product schema itself...i think that makes more sense also.
So - can I have something like:
where
id is what Is passed in when calling decode? Should be doable right? just seems maybe i'm not appraoching it right?