@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Function mapResultErr

    • Transforms the failure value, passing successes through unchanged.

      Preserves cancelled: mapping an error must not silently turn a cancellation into a failure. If fn throws, that exception propagates; it is not wrapped in a Result.

      Type Parameters

      • T
      • E
      • F

      Parameters

      Returns Result<T, F>

      const wrapped = mapResultErr(result, (cause) => userError({ code: 'X', message: 'Failed.', cause }));