ts.data.json - v4.1.0
    Preparing search index...

    Function err

    • Creates a new Err instance representing a failed operation.

      Type Parameters

      • T

        The type that would have been returned if successful

      Parameters

      • issues: readonly DecodingIssue[]

        One or more structured issues describing what went wrong and where.

      Returns Result<T>

      const result = JsonDecoder.err<number>([{ message: "Invalid number", path: ["age"] }]);
      // result.issues === [{ message: "Invalid number", path: ["age"] }]