onrails
    Preparing search index...

    Variable matchResultConst

    matchResult: {
        <T, E, U>(
            result: Result<T, E>,
            onOk: (value: T) => U,
            onErr: (error: E) => U,
        ): U;
        <T, E, U>(
            onOk: (value: T) => U,
            onErr: (error: E) => U,
        ): (result: Result<T, E>) => U;
    } = match

    Collision-free alias for files that also import match from ts-pattern.

    Type Declaration

      • <T, E, U>(
            result: Result<T, E>,
            onOk: (value: T) => U,
            onErr: (error: E) => U,
        ): U
      • 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));
        
      • <T, E, U>(
            onOk: (value: T) => U,
            onErr: (error: E) => U,
        ): (result: Result<T, E>) => U
      • 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));