effect-io-ai

Package: effect
Module: SchemaAST

SchemaAST.Declaration

AST node for user-defined opaque types with custom parsing logic.

When to use

Use when you need a custom schema AST node because none of the built-in nodes fit.

Details

See

Signature

declare class Declaration { constructor(
    typeParameters: ReadonlyArray<AST>,
    run: (
      typeParameters: ReadonlyArray<AST>
    ) => (input: unknown, self: Declaration, options: ParseOptions) => Effect.Effect<any, SchemaIssue.Issue, any>,
    annotations?: Schema.Annotations.Annotations,
    checks?: Checks,
    encoding?: Encoding,
    context?: Context,
    encodingChecks?: Checks
  ) }

Source

Since v3.10.0