onrails
    Preparing search index...
    • Map only errors matching kind, leave others unchanged

      Type Parameters

      • E extends { kind: string }
      • K extends string
      • F

      Parameters

      • kind: K
      • fn: (error: Extract<E, { kind: K }>) => F

      Returns <T>(result: Result<T, E>) => Result<T, E | F>