Hyperlinkv0.8.0-beta.28

Schema

Schema.Annotationsnamespaceeffect/Schema.ts:14260
any

The Annotations namespace groups all annotation interfaces used to attach metadata to schemas. Annotations control documentation, validation messages, JSON Schema generation, equivalence, arbitrary generation, and more.

Details

Use resolveAnnotations to read the annotations attached to a schema at runtime.

Source effect/Schema.ts:14260861 lines
export declare namespace Annotations {
  /**
   * This interface is used to define the annotations that can be attached to a
   * schema. You can extend this interface to define your own annotations.
   *
   * **Details**
   *
   * Note that both a missing key or `undefined` is used to indicate that the
   * annotation is not present.
   *
   * This means that can remove any annotation by setting it to `undefined`.
   *
   * **Example** (Defining your own annotations)
   *
   * ```ts
   * import { Schema } from "effect"
   *
   * // Extend the Annotations interface with a custom `version` annotation
   * declare module "effect/Schema" {
   *   namespace Annotations {
   *     interface Annotations {
   *       readonly version?:
   *         | readonly [major: number, minor: number, patch: number]
   *         | undefined
   *     }
   *   }
   * }
   *
   * // The `version` annotation is now recognized by the TypeScript compiler
   * const schema = Schema.String.annotate({ version: [1, 2, 0] })
   *
   * // const version: readonly [major: number, minor: number, patch: number] | undefined
   * const version = Schema.resolveAnnotations(schema)?.["version"]
   *
   * if (version) {
   *   // Access individual parts of the version
   *   console.log(version[1])
   *   // Output: 2
   * }
   * ```
   *
   * @category models
   * @since 4.0.0
   */
  export interface Annotations {
    readonly [x: string]: unknown
  }

  /**
   * Annotations shared by all schema nodes. These map to common JSON Schema /
   * OpenAPI fields: `title`, `description`, `format`, etc.
   *
   * @category models
   * @since 4.0.0
   */
  export interface Augment extends Annotations {
    /**
     * Human-readable description of what a value is expected to satisfy.
     *
     * **Details**
     *
     * For filter and refinement failures, the default formatter uses
     * `message` first, then `expected`, and finally falls back to `<filter>`.
     *
     * Use this to name a failed filter in the default message:
     * `Expected <expected>, got <actual>`.
     */
    readonly expected?: string | undefined
    readonly title?: string | undefined
    readonly description?: string | undefined
    readonly documentation?: string | undefined
    readonly readOnly?: boolean | undefined
    readonly writeOnly?: boolean | undefined
    readonly format?: string | undefined
    readonly contentEncoding?: string | undefined
    readonly contentMediaType?: string | undefined
  }

  /**
   * Extends {@link Augment} with type-parametric `default` and `examples` fields.
   *
   * @category models
   * @since 4.0.0
   */
  export interface Documentation<T> extends Augment {
    readonly default?: T | undefined
    readonly examples?: ReadonlyArray<T> | undefined
  }

  /**
   * Annotations for struct property schemas. Extends {@link Documentation}
   * with an optional `messageMissingKey` to override the error message when
   * the property key is absent during decoding.
   *
   * @category models
   * @since 4.0.0
   */
  export interface Key<T> extends Documentation<T> {
    /**
     * The message to use when a key is missing.
     */
    readonly messageMissingKey?: string | undefined
  }

  /**
   * Base annotations shared by all composite schema nodes. Extends
   * {@link Documentation} with error messages, branding, parse options, and
   * arbitrary generation hooks. {@link Declaration} and other annotation
   * interfaces build on top of this.
   *
   * @category models
   * @since 4.0.0
   */
  export interface Bottom<T, TypeParameters extends ReadonlyArray<Constraint>> extends Documentation<T> {
    /**
     * Complete message to use when this schema node reports an issue.
     *
     * **Details**
     *
     * This replaces the default message for matching issue types instead of
     * only changing the expected label. For a filter or refinement failure,
     * annotate the filter with `message` to replace the whole filter failure
     * message, or `expected` to keep the default
     * `Expected <expected>, got <actual>` shape.
     */
    readonly message?: string | undefined
    /**
     * The message to use when a key is unexpected.
     */
    readonly messageUnexpectedKey?: string | undefined
    /**
     * Stable identifier for this schema node.
     *
     * **Details**
     *
     * Identifiers are used by schema tooling, including JSON Schema
     * generation, to name references. The default formatter also uses
     * `identifier` as the expected label for type-level failures, such as
     * `Expected UserId, got null`.
     *
     * `identifier` does not name a failed filter or refinement. If the base
     * type matches and a filter fails, put `expected` or `message` on the
     * filter/refinement instead.
     */
    readonly identifier?: string | undefined
    readonly parseOptions?: SchemaAST.ParseOptions | undefined
    /**
     * Optional metadata used to identify or extend the filter with custom data.
     */
    readonly meta?: Meta | undefined
    /**
     * Accumulated brands when multiple brands are added with `Schema.brand`.
     */
    readonly brands?: ReadonlyArray<string> | undefined
    readonly toArbitrary?:
      | ToArbitrary.Declaration<T, TypeParameters>
      | undefined
  }

  /**
   * Helpers for projecting declaration type-parameter schemas into decoded or
   * encoded codec arrays used by annotation hooks.
   *
   * @since 4.0.0
   */
  export namespace TypeParameters {
    /**
     * Maps declaration type-parameter schemas to codecs for their decoded `Type`
     * values.
     *
     * @category utility types
     * @since 4.0.0
     */
    export type Type<TypeParameters extends ReadonlyArray<Constraint>> = {
      readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Type"]>
    }
    /**
     * Maps declaration type-parameter schemas to codecs for their `Encoded` values.
     *
     * @category utility types
     * @since 4.0.0
     */
    export type Encoded<TypeParameters extends ReadonlyArray<Constraint>> = {
      readonly [K in keyof TypeParameters]: Codec<TypeParameters[K]["Encoded"]>
    }
  }

  /**
   * Full annotation set for `Declaration` schema nodes — used when defining
   * custom, opaque schema types via `Schema.declare`. Extends {@link Bottom}
   * with optional codec, arbitrary, equivalence, and formatter hooks so that
   * derived capabilities (JSON encoding, property testing, etc.) can be
   * provided for the custom type.
   *
   * @category models
   * @since 4.0.0
   */
  export interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint> = readonly []>
    extends Bottom<T, TypeParameters>
  {
    readonly toCodec?:
      | ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link)
      | undefined
    readonly toCodecJson?:
      | ((typeParameters: TypeParameters.Encoded<TypeParameters>) => SchemaAST.Link)
      | undefined
    readonly toCodecIso?:
      | ((typeParameters: TypeParameters.Type<TypeParameters>) => SchemaAST.Link)
      | undefined
    readonly toArbitrary?: ToArbitrary.Declaration<T, TypeParameters> | undefined
    readonly toEquivalence?: ToEquivalence.Declaration<T, TypeParameters> | undefined
    readonly toFormatter?: ToFormatter.Declaration<T, TypeParameters> | undefined
    readonly typeConstructor?: {
      readonly _tag: string
      readonly [key: string]: unknown
    } | undefined
    readonly generation?: {
      readonly runtime: string
      readonly Type: string
      readonly Encoded?: string | undefined
      readonly importDeclaration?: string | undefined
    } | undefined
    /**
     * Used to collect sentinels from a Declaration SchemaAST.
     *
     * @internal
     */
    readonly "~sentinels"?: ReadonlyArray<SchemaAST.Sentinel> | undefined
  }

  /**
   * Annotations for filter schema nodes (created via `Schema.filter`). Extends
   * {@link Augment} with an optional error message, identifier, and metadata.
   * Filters are intentionally non-parametric to keep them covariant.
   *
   * @category models
   * @since 4.0.0
   */
  export interface Filter extends Augment {
    /**
     * Complete message to use when this filter or refinement fails.
     *
     * **Details**
     *
     * The default formatter checks filter annotations in this order:
     * `message`, then `expected`, then `<filter>`.
     */
    readonly message?: string | undefined
    /**
     * Stable identifier for the schema after this filter is attached.
     *
     * **Details**
     *
     * This can affect schema tooling such as JSON Schema generation and
     * type-level failures before the filter runs, but it does not name the
     * failed filter itself. For filter failure messages, use `expected` or
     * `message`.
     */
    readonly identifier?: string | undefined
    /**
     * Optional metadata used to identify or extend the filter with custom data.
     */
    readonly meta?: Meta | undefined
    /**
     * Optional hints used by arbitrary derivation for this filter.
     *
     * **Details**
     *
     * The same annotation can be attached to a single filter or a
     * `FilterGroup`. Group hints apply to the same schema node while child
     * filters are still collected and checked normally.
     */
    readonly arbitrary?:
      | ToArbitrary.Filter
      | undefined
    /**
     * Marks the filter as *structural*, meaning it applies to the shape or
     * structure of the container (e.g., array length, object keys) rather than
     * the contents.
     *
     * **Details**
     *
     * Example: `minLength` on an array is a structural filter.
     */
    readonly "~structural"?: boolean | undefined
  }

  /**
   * Types used by arbitrary-derivation annotations to configure `toArbitrary`
   * hooks, filter hints, candidate sources, diagnostics, and merged generation
   * constraints.
   *
   * @since 4.0.0
   */
  export namespace ToArbitrary {
    /**
     * Arbitrary-generation hints attached to a filter or filter group.
     *
     * **Details**
     *
     * `constraint` refines the schema node's base generator. `candidate` adds a
     * weighted source before all filters run. If neither hint is provided, the
     * filter does not guide generation; generated values are still checked by
     * the filter predicate. With `{ report: true }`, this is reported as
     * `OpaqueFilter`.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Filter {
      readonly constraint?: GenerationConstraint | undefined
      readonly candidate?: Candidate | undefined
    }

    /**
     * Additional arbitrary source used before final filter checks run.
     *
     * **Details**
     *
     * The base generator keeps weight `1`; candidates default to weight `1`
     * and must use a positive integer weight. `make` receives the merged
     * constraint for the current node and may return `undefined` to opt out,
     * including for recursive terminal branches. Candidate values are still
     * checked by every schema filter, so invalid candidates affect efficiency but
     * not validity.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Candidate {
      readonly weight?: number | undefined
      readonly make: (
        fc: typeof FastCheck,
        context: Context
      ) => FastCheck.Arbitrary<unknown> | undefined
    }

    /**
     * Ordered constraint accumulated from range checks.
     *
     * **Details**
     *
     * Generators consume these constraints only when they recognize `order`,
     * such as `Order.Number`, `Order.BigInt`, DateTime, or BigDecimal. Merging
     * constraints with different `Order` instances fails fast.
     *
     * @category models
     * @since 4.0.0
     */
    export interface OrderedConstraint<T> {
      readonly order: Order.Order<T>
      readonly minimum?: T | undefined
      readonly exclusiveMinimum?: boolean | undefined
      readonly maximum?: T | undefined
      readonly exclusiveMaximum?: boolean | undefined
    }

    /**
     * Node-local arbitrary-generation constraint accumulated from schema checks.
     *
     * **Details**
     *
     * `GenerationConstraint` is a generation hint for the current schema AST
     * node, not a self-describing validation contract. Each generator consumes
     * the fields it understands for the current node and ignores the rest;
     * final schema filters still validate every generated value.
     *
     * `minLength` and `maxLength` represent node-local cardinality: string
     * length for strings, array length for arrays, final own-property count for
     * objects, and final size/cardinality for sets, maps, hash collections, and
     * chunks. `patterns` are concatenated and used by string generators.
     * `integer`, `noNaN`, `noInfinity`, `valid`, and `unique` are true when any
     * contributing filter sets them. Range bounds live in `ordered` so ordered
     * values can share the same representation.
     *
     * @category models
     * @since 4.0.0
     */
    export interface GenerationConstraint {
      readonly minLength?: number | undefined
      readonly maxLength?: number | undefined
      readonly patterns?: readonly [string, ...Array<string>]
      readonly integer?: boolean | undefined
      readonly noInfinity?: boolean | undefined
      readonly noNaN?: boolean | undefined
      readonly valid?: boolean | undefined
      readonly unique?: boolean | undefined
      readonly ordered?: OrderedConstraint<any> | undefined
    }

    /**
     * Recursion budget passed to arbitrary-derivation hooks.
     *
     * **Details**
     *
     * Pass this object to `fc.oneof` when combining terminal and recursive
     * branches. Put the terminal branch first because fast-check uses only the
     * first branch once `maxDepth` is reached for `depthIdentifier`.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Recursion {
      readonly maxDepth: number
      readonly depthIdentifier: FastCheck.DepthIdentifier | string
    }

    /**
     * Context passed to arbitrary-derivation hooks and candidate factories.
     *
     * **Details**
     *
     * `constraint` contains the merged constraint for the current schema
     * node. `recursion` is present while deriving through a suspended schema;
     * hooks that build recursive alternatives should pass it to `fc.oneof` with
     * the finite branch first.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Context {
      readonly constraint?: ToArbitrary.GenerationConstraint | undefined
      readonly recursion?: ToArbitrary.Recursion | undefined
    }

    /**
     * Arbitrary generators derived for a declaration type parameter.
     *
     * **Details**
     *
     * `arbitrary` is the normal generator. `terminal` is the finite generator
     * used while building recursive terminal branches and is `undefined` when
     * no finite path is known. Optional containers can ignore it; non-empty
     * containers need it for their terminal branch.
     *
     * @category models
     * @since 4.0.0
     */
    export interface TypeParameter<T> {
      readonly arbitrary: FastCheck.Arbitrary<T>
      readonly terminal: FastCheck.Arbitrary<T> | undefined
    }

    /**
     * Arbitrary derivation returned by declaration hooks.
     *
     * **Details**
     *
     * `arbitrary` is the normal generator. `terminal` is an optional finite
     * branch for recursive schemas. If omitted, it defaults to `arbitrary` only
     * for declarations without type parameters.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Derivation<T> {
      readonly arbitrary: FastCheck.Arbitrary<T>
      readonly terminal?: FastCheck.Arbitrary<T> | undefined
    }

    /**
     * Output accepted from declaration arbitrary hooks.
     *
     * **Details**
     *
     * A bare fast-check arbitrary is shorthand for `{ arbitrary }`, useful for
     * atomic declarations such as URLs. Generic declarations that need precise
     * recursive behavior should return a {@link Derivation} with `terminal`.
     *
     * @category models
     * @since 4.0.0
     */
    export type Output<T> = FastCheck.Arbitrary<T> | Derivation<T>

    /**
     * Hook signature for declaration schema arbitrary annotations.
     *
     * **Details**
     *
     * Type parameters expose normal and terminal generators. A declaration with
     * no type parameters can return a bare arbitrary; a generic declaration
     * must return `terminal` explicitly when it has a finite branch depending on
     * parameters.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint>> {
      (
        /* Arbitrary derivations for any type parameters of the schema (if present) */
        typeParameters: { readonly [K in keyof TypeParameters]: TypeParameter<TypeParameters[K]["Type"]> }
      ): (fc: typeof FastCheck, context: Context) => Output<T>
    }

    /**
     * Wraps a derived value together with arbitrary-derivation diagnostics.
     *
     * @category models
     * @since 4.0.0
     */
    export interface WithReport<A> {
      readonly value: A
      readonly report: Report
    }

    /**
     * Diagnostics collected while deriving an arbitrary.
     *
     * **Details**
     *
     * Reports contain warnings only. Unsupported schema nodes, impossible
     * constraints, invalid candidate weights, and throwing candidate factories
     * fail immediately.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Report {
      readonly warnings: ReadonlyArray<Warning>
    }

    /**
     * Non-fatal arbitrary-derivation warning.
     *
     * @category models
     * @since 4.0.0
     */
    export type Warning = OpaqueFilterWarning

    /**
     * Warning emitted when a filter is handled only by the final `.filter`.
     *
     * **Details**
     *
     * The filter is still enforced. The warning means it did not contribute
     * a constraint or candidate, so generation may rely on fast-check discards.
     *
     * @category models
     * @since 4.0.0
     */
    export interface OpaqueFilterWarning {
      readonly _tag: "OpaqueFilter"
      readonly path: ReadonlyArray<PropertyKey>
      readonly description?: string | undefined
    }
  }

  /**
   * Types used by formatter annotations to customize formatter derivation for
   * declaration schemas.
   *
   * @since 4.0.0
   */
  export namespace ToFormatter {
    /**
     * Hook signature for declaration schema formatter annotations.
     *
     * **Details**
     *
     * Given formatters for any type parameters, returns a formatter for `T`.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint>> {
      (
        /* Formatters for any type parameters of the schema (if present) */
        typeParameters: { readonly [K in keyof TypeParameters]: Formatter<TypeParameters[K]["Type"]> }
      ): Formatter<T>
    }
  }

  /**
   * Types used by equivalence annotations to customize equivalence derivation for
   * declaration schemas.
   *
   * @since 4.0.0
   */
  export namespace ToEquivalence {
    /**
     * Hook signature for declaration schema equivalence annotations.
     *
     * **Details**
     *
     * Given equivalences for any type parameters, returns an `Equivalence` for `T`.
     *
     * @category models
     * @since 4.0.0
     */
    export interface Declaration<T, TypeParameters extends ReadonlyArray<Constraint>> {
      (
        /* Equivalences for any type parameters of the schema (if present) */
        typeParameters: { readonly [K in keyof TypeParameters]: Equivalence.Equivalence<TypeParameters[K]["Type"]> }
      ): Equivalence.Equivalence<T>
    }
  }

  /**
   * Annotations that can be attached to schema issues.
   *
   * **Details**
   *
   * The optional `message` field overrides the default issue message.
   *
   * @category models
   * @since 4.0.0
   */
  export interface Issue extends Annotations {
    readonly message?: string | undefined
  }

  /**
   * Registry of metadata payloads emitted by built-in schema filters and checks.
   *
   * **Details**
   *
   * Do not augment this interface with custom metadata; extend `MetaDefinitions`
   * instead.
   *
   * @category models
   * @since 4.0.0
   */
  export interface BuiltInMetaDefinitions {
    // String Meta
    readonly isStringFinite: {
      readonly _tag: "isStringFinite"
      readonly regExp: globalThis.RegExp
    }
    readonly isStringBigInt: {
      readonly _tag: "isStringBigInt"
      readonly regExp: globalThis.RegExp
    }
    readonly isStringSymbol: {
      readonly _tag: "isStringSymbol"
      readonly regExp: globalThis.RegExp
    }
    readonly isMinLength: {
      readonly _tag: "isMinLength"
      readonly minLength: number
    }
    readonly isMaxLength: {
      readonly _tag: "isMaxLength"
      readonly maxLength: number
    }
    readonly isLengthBetween: {
      readonly _tag: "isLengthBetween"
      readonly minimum: number
      readonly maximum: number
    }
    readonly isPattern: {
      readonly _tag: "isPattern"
      readonly regExp: globalThis.RegExp
    }
    readonly isTrimmed: {
      readonly _tag: "isTrimmed"
      readonly regExp: globalThis.RegExp
    }
    readonly isUUID: {
      readonly _tag: "isUUID"
      readonly regExp: globalThis.RegExp
      readonly version: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | undefined
    }
    readonly isGUID: {
      readonly _tag: "isGUID"
      readonly regExp: globalThis.RegExp
    }
    readonly isULID: {
      readonly _tag: "isULID"
      readonly regExp: globalThis.RegExp
    }
    readonly isBase64: {
      readonly _tag: "isBase64"
      readonly regExp: globalThis.RegExp
    }
    readonly isBase64Url: {
      readonly _tag: "isBase64Url"
      readonly regExp: globalThis.RegExp
    }
    readonly isStartsWith: {
      readonly _tag: "isStartsWith"
      readonly startsWith: string
      readonly regExp: globalThis.RegExp
    }
    readonly isEndsWith: {
      readonly _tag: "isEndsWith"
      readonly endsWith: string
      readonly regExp: globalThis.RegExp
    }
    readonly isIncludes: {
      readonly _tag: "isIncludes"
      readonly includes: string
      readonly regExp: globalThis.RegExp
    }
    readonly isUppercased: {
      readonly _tag: "isUppercased"
      readonly regExp: globalThis.RegExp
    }
    readonly isLowercased: {
      readonly _tag: "isLowercased"
      readonly regExp: globalThis.RegExp
    }
    readonly isCapitalized: {
      readonly _tag: "isCapitalized"
      readonly regExp: globalThis.RegExp
    }
    readonly isUncapitalized: {
      readonly _tag: "isUncapitalized"
      readonly regExp: globalThis.RegExp
    }
    // Number Meta
    readonly isFinite: {
      readonly _tag: "isFinite"
    }
    readonly isInt: {
      readonly _tag: "isInt"
    }
    readonly isMultipleOf: {
      readonly _tag: "isMultipleOf"
      readonly divisor: number
    }
    readonly isGreaterThan: {
      readonly _tag: "isGreaterThan"
      readonly exclusiveMinimum: number
    }
    readonly isGreaterThanOrEqualTo: {
      readonly _tag: "isGreaterThanOrEqualTo"
      readonly minimum: number
    }
    readonly isLessThan: {
      readonly _tag: "isLessThan"
      readonly exclusiveMaximum: number
    }
    readonly isLessThanOrEqualTo: {
      readonly _tag: "isLessThanOrEqualTo"
      readonly maximum: number
    }
    readonly isBetween: {
      readonly _tag: "isBetween"
      readonly minimum: number
      readonly maximum: number
      readonly exclusiveMinimum?: boolean | undefined
      readonly exclusiveMaximum?: boolean | undefined
    }
    // BigInt Meta
    readonly isGreaterThanBigInt: {
      readonly _tag: "isGreaterThanBigInt"
      readonly exclusiveMinimum: bigint
    }
    readonly isGreaterThanOrEqualToBigInt: {
      readonly _tag: "isGreaterThanOrEqualToBigInt"
      readonly minimum: bigint
    }
    readonly isLessThanBigInt: {
      readonly _tag: "isLessThanBigInt"
      readonly exclusiveMaximum: bigint
    }
    readonly isLessThanOrEqualToBigInt: {
      readonly _tag: "isLessThanOrEqualToBigInt"
      readonly maximum: bigint
    }
    readonly isBetweenBigInt: {
      readonly _tag: "isBetweenBigInt"
      readonly minimum: bigint
      readonly maximum: bigint
      readonly exclusiveMinimum?: boolean | undefined
      readonly exclusiveMaximum?: boolean | undefined
    }
    // Date Meta
    readonly isDateValid: {
      readonly _tag: "isDateValid"
    }
    readonly isGreaterThanDate: {
      readonly _tag: "isGreaterThanDate"
      readonly exclusiveMinimum: globalThis.Date
    }
    readonly isGreaterThanOrEqualToDate: {
      readonly _tag: "isGreaterThanOrEqualToDate"
      readonly minimum: globalThis.Date
    }
    readonly isLessThanDate: {
      readonly _tag: "isLessThanDate"
      readonly exclusiveMaximum: globalThis.Date
    }
    readonly isLessThanOrEqualToDate: {
      readonly _tag: "isLessThanOrEqualToDate"
      readonly maximum: globalThis.Date
    }
    readonly isBetweenDate: {
      readonly _tag: "isBetweenDate"
      readonly minimum: globalThis.Date
      readonly maximum: globalThis.Date
      readonly exclusiveMinimum?: boolean | undefined
      readonly exclusiveMaximum?: boolean | undefined
    }
    // Objects Meta
    readonly isMinProperties: {
      readonly _tag: "isMinProperties"
      readonly minProperties: number
    }
    readonly isMaxProperties: {
      readonly _tag: "isMaxProperties"
      readonly maxProperties: number
    }
    readonly isPropertiesLengthBetween: {
      readonly _tag: "isPropertiesLengthBetween"
      readonly minimum: number
      readonly maximum: number
    }
    readonly isPropertyNames: {
      readonly _tag: "isPropertyNames"
      readonly propertyNames: SchemaAST.AST
    }
    // Arrays Meta
    readonly isUnique: {
      readonly _tag: "isUnique"
    }
    // Declaration Meta
    readonly isMinSize: {
      readonly _tag: "isMinSize"
      readonly minSize: number
    }
    readonly isMaxSize: {
      readonly _tag: "isMaxSize"
      readonly maxSize: number
    }
    readonly isSizeBetween: {
      readonly _tag: "isSizeBetween"
      readonly minimum: number
      readonly maximum: number
    }
  }

  /**
   * Union of all metadata payloads defined by `BuiltInMetaDefinitions`.
   *
   * @category utility types
   * @since 4.0.0
   */
  export type BuiltInMeta = BuiltInMetaDefinitions[keyof BuiltInMetaDefinitions]

  /**
   * Augmentable registry of schema filter metadata payloads.
   *
   * **Details**
   *
   * Extend this interface to add custom values accepted by annotation `meta`
   * fields.
   *
   * @category models
   * @since 4.0.0
   */
  export interface MetaDefinitions extends BuiltInMetaDefinitions {}

  /**
   * Union of built-in and user-augmented schema filter metadata payloads.
   *
   * @category utility types
   * @since 4.0.0
   */
  export type Meta = MetaDefinitions[keyof MetaDefinitions]
}
Referenced by 113 symbols