effect-io-ai

Package: effect
Module: SchemaAST

SchemaAST.decodeTo

Attaches a Transformation to the to AST, making it decode from the from AST and encode back to it.

Details

This is the low-level primitive behind Schema.transform and Schema.transformOrFail. It appends a Link to the to node’s encoding chain.

See

Signature

declare const decodeTo: <A extends AST>(from: AST, to: A, transformation: SchemaTransformation.Transformation<any, any, any, any>) => A

Source

Since v4.0.0