t-tasks
    Preparing search index...

    Function generate

    • Create compound Maybe from generator function

      Applying yield to a Maybe within the generator function unwraps the Maybe and returns underlying value in case of success However the convenient option for typescript is to use yield* maybe.generator() as otherwise one may have to deal with union types

      Type Parameters

      • T

        yielded underlying type

      • TT extends Maybe<T>

        yielded Maybe type

      • R

        returned underlying type

      Parameters

      Returns Maybe<R>

      Just wrapping the result of generator function or Nothing