mini-effect
    Preparing search index...

    Variable succeedConst

    succeed: {
        (): Effect<void, never, never, never>;
        <R>(result: R): Effect<R, never, never, never>;
    } = ...

    Creates an Effect that immediately succeeds with the given value.

    Type Declaration

      • (): Effect<void, never, never, never>
      • Returns Effect<void, never, never, never>

      • <R>(result: R): Effect<R, never, never, never>
      • Type Parameters

        • R

        Parameters

        • result: R

        Returns Effect<R, never, never, never>

    When called with no arguments, produces an Effect<void> that resolves to undefined. When called with a value, produces an Effect<R> that resolves to that value. The returned effect never fails (error type is never).

    The type of the success value

    The value the effect will resolve to. If omitted, the effect resolves to void.

    An Effect that always succeeds with result

    import { succeed, run } from "mini-effect";

    const fortyTwo = succeed(42);
    await run(fortyTwo); // => 42

    const noValue = succeed();
    await run(noValue); // => undefined