Roqueform
    Preparing search index...

    Type Alias ErrorsConcatenator<Error>

    ErrorsConcatenator: (
        prevErrors: readonly Error[],
        error: Error,
    ) => readonly Error[]

    The callback that returns a new array of errors that includes the given error, or returns the prevErrors as if there are no changes. By default, only identity-based-unique errors are added.

    Type Parameters

    • Error = any

      The error associated with the field.

    Type declaration

      • (prevErrors: readonly Error[], error: Error): readonly Error[]
      • Parameters

        • prevErrors: readonly Error[]

          The array of existing errors.

        • error: Error

          The new error to add.

        Returns readonly Error[]

        The new array of errors that includes the given error.