Package: effect
Module: SchemaAST
Returns the encoded (wire-format) AST by flipping and then stripping encodings.
Details
Equivalent to toType(flip(ast)). This gives you the AST that describes
the shape of the serialized/encoded data.
Example (Getting the encoded AST)
import { Schema, SchemaAST } from "effect"
const schema = Schema.NumberFromString
const encodedAst = SchemaAST.toEncoded(schema.ast)
console.log(encodedAst._tag) // "String"
See
toTypeflipSignature
declare const toEncoded: (ast: AST) => AST
Since v4.0.0