effect-io-ai

Package: effect
Module: SchemaAST

SchemaAST.flip

Swaps the decode and encode directions of an AST’s Encoding chain.

Details

After flipping, what was decoding becomes encoding and vice versa. This is the core operation behind Schema.encode — encoding a value is decoding with a flipped SchemaAST.

See

Signature

declare const flip: (ast: AST) => AST

Source

Since v4.0.0