Package: effect
Module: SchemaAST
Returns all annotations from the AST node.
Details
If the node has Checks, returns annotations from the last check
(which is where user-supplied annotations end up after .pipe(Schema.annotations(...))).
Otherwise returns Base.annotations directly.
Example (Reading annotations)
import { Schema, SchemaAST } from "effect"
const schema = Schema.String.annotate({ title: "Name" })
const annotations = SchemaAST.resolve(schema.ast)
console.log(annotations?.title) // "Name"
See
resolveAtresolveIdentifierresolveTitleresolveDescriptionSignature
declare const resolve: (ast: AST) => Schema.Annotations.Annotations | undefined
Since v4.0.0