Interface DecodingFailureUtils

Additional methods available on a decoding failure.

interface DecodingFailureUtils {
    concat(errors): DecodingErrors;
    foreach(fun): void;
    map<T>(fun): T[];
}

Hierarchy (view full)

Methods

  • Apply an operation on every decoding error and an array of paths where that error occurred.

    Parameters

    • fun: ((message, paths) => void)

      operation

        • (message, paths): void
        • Parameters

          • message: string
          • paths: Path[]

          Returns void

    Returns void

  • Transform decoding errors by applying a transformer on every error and an array of paths where that error occurred.

    Type Parameters

    • T

      type of transformation result

    Parameters

    • fun: ((message, paths) => T)

      transformer function

        • (message, paths): T
        • Parameters

          • message: string
          • paths: Path[]

          Returns T

    Returns T[]

Generated using TypeDoc