© 2026 Hedgehog Software, LLC
Effect.if
!== undefined
onTrue: () => myVal <~ myVal is possible undefined
return yield* Effect.if(dbEntry !== undefined, { // @NOTE we shouldn't need this, I am not sure why Effect doesn't guard it? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion onTrue: () => Effect.succeed(dbEntry!), onFalse: () => Effect.fail( new DbError({ reason: "Something has gone wrong", }), ), });
"effect": "3.12.7",