Issue with Documentation Example

I was playing around with an example in the documents:

    const flipTheCoin = Effect.if(Random.nextBoolean, {
      onTrue: () => Console.log("Head"),
      onFalse: () => Console.log("Tail")
    })

    Effect.runPromise(flipTheCoin)


and I can't get it to compile, but if I change it to:

    const flipTheCoin = Effect.if(Random.nextBoolean, {
      onTrue: Console.log("Head"),
      onFalse: Console.log("Tail")
    })

    Effect.runPromise(flipTheCoin)


It will run.

Is this an issue in the documentation, or do I have some settings messed up?
Was this page helpful?