onrails
    Preparing search index...
    • Terminal collapse — fold both tracks into a single value. Dual-form: 3-args data-first, 2-args curried for pipe. Returns whatever the handlers return.

      For files that also import match from ts-pattern, the collision-free alias matchResult is identical.

      Type Parameters

      • T
      • E
      • U

      Parameters

      • result: Result<T, E>
      • onOk: (value: T) => U
      • onErr: (error: E) => U

      Returns U

      const html = match(parsed, (cfg) => render(cfg), (e) => renderError(e));
      
    • Terminal collapse — fold both tracks into a single value. Dual-form: 3-args data-first, 2-args curried for pipe. Returns whatever the handlers return.

      For files that also import match from ts-pattern, the collision-free alias matchResult is identical.

      Type Parameters

      • T
      • E
      • U

      Parameters

      • onOk: (value: T) => U
      • onErr: (error: E) => U

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

      const html = match(parsed, (cfg) => render(cfg), (e) => renderError(e));