Converting Option to Effect in Effect.gen
How can I convert an Option to an effect in a Effect.gen ?
const eff = Effect.gen(function* () {
const contentType = yield* pipe(
selectionDataUrl,
String.split(","),
Array.head,
Option.map(String.replace(";base64", "")),
Option.map(String.slice(String.length("data:"))),
// what should I had here so my Option<string> become Effect<string, ContentTypeCantBeDeduced>
);
});