mini-effect
    Preparing search index...

    Interface UnionSchema<TOptions$1, TMessage>

    Union schema interface.

    interface UnionSchema<
        TOptions$1 extends UnionOptions,
        TMessage extends
            ErrorMessage<UnionIssue<InferIssue<TOptions$1[number]>>> | undefined,
    > {
        "~run": (
            dataset: UnknownDataset,
            config: Config<BaseIssue<unknown>>,
        ) => OutputDataset<
            InferOutput<TOptions$1[number]>,

                | InferIssue<TOptions$1[number]>
                | UnionIssue<InferIssue<TOptions$1[number]>>,
        >;
        "~standard": StandardProps<
            InferInput<TOptions$1[number]>,
            InferOutput<TOptions$1[number]>,
        >;
        "~types"?: {
            input: InferInput;
            issue:
                | InferIssue<TOptions$1[number]>
                | UnionIssue<InferIssue<TOptions$1[number]>>;
            output: InferOutput;
        };
        async: false;
        expects: string;
        kind: "schema";
        message: TMessage;
        options: TOptions$1;
        reference: {
            <const TOptions$1 extends UnionOptions>(
                options: TOptions$1,
            ): UnionSchema<TOptions$1, undefined>;
            <
                const TOptions$1 extends UnionOptions,
                const TMessage extends
                    ErrorMessage<UnionIssue<InferIssue<TOptions$1[number]>>> | undefined,
            >(
                options: TOptions$1,
                message: TMessage,
            ): UnionSchema<TOptions$1, TMessage>;
        };
        type: "union";
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    "~run": (
        dataset: UnknownDataset,
        config: Config<BaseIssue<unknown>>,
    ) => OutputDataset<
        InferOutput<TOptions$1[number]>,
        InferIssue<TOptions$1[number]> | UnionIssue<InferIssue<TOptions$1[number]>>,
    >

    Parses unknown input values.

    Type Declaration

    "~standard": StandardProps<
        InferInput<TOptions$1[number]>,
        InferOutput<TOptions$1[number]>,
    >

    The Standard Schema properties.

    "~types"?: {
        input: InferInput;
        issue:
            | InferIssue<TOptions$1[number]>
            | UnionIssue<InferIssue<TOptions$1[number]>>;
        output: InferOutput;
    }

    The input, output and issue type.

    async: false

    Whether it's async.

    expects: string

    The expected property.

    kind: "schema"

    The object kind.

    message: TMessage

    The error message.

    options: TOptions$1

    The union options.

    reference: {
        <const TOptions$1 extends UnionOptions>(
            options: TOptions$1,
        ): UnionSchema<TOptions$1, undefined>;
        <
            const TOptions$1 extends UnionOptions,
            const TMessage extends
                ErrorMessage<UnionIssue<InferIssue<TOptions$1[number]>>> | undefined,
        >(
            options: TOptions$1,
            message: TMessage,
        ): UnionSchema<TOptions$1, TMessage>;
    }

    The schema reference.

    Type Declaration

      • <const TOptions$1 extends UnionOptions>(
            options: TOptions$1,
        ): UnionSchema<TOptions$1, undefined>
      • Creates an union schema.

        Type Parameters

        Parameters

        • options: TOptions$1

          The union options.

        Returns UnionSchema<TOptions$1, undefined>

        An union schema.

      • <
            const TOptions$1 extends UnionOptions,
            const TMessage extends
                ErrorMessage<UnionIssue<InferIssue<TOptions$1[number]>>> | undefined,
        >(
            options: TOptions$1,
            message: TMessage,
        ): UnionSchema<TOptions$1, TMessage>
      • Creates an union schema.

        Type Parameters

        Parameters

        • options: TOptions$1

          The union options.

        • message: TMessage

          The error message.

        Returns UnionSchema<TOptions$1, TMessage>

        An union schema.

    type: "union"

    The schema type.