MCPcopy
hub / github.com/Effect-TS/effect / transposeOption

Function transposeOption

packages/effect/src/Effect.ts:13338–13342  ·  view source on GitHub ↗
(
  self: Option.Option<Effect<A, E, R>>
)

Source from the content-addressed store, hash-verified

13336 * @category Optional Wrapping & Unwrapping
13337 */
13338export const transposeOption = <A = never, E = never, R = never>(
13339 self: Option.Option<Effect<A, E, R>>
13340): Effect<Option.Option<A>, E, R> => {
13341 return option_.isNone(self) ? succeedNone : map(self.value, option_.some)
13342}
13343
13344/**
13345 * Applies an `Effect` on an `Option` and transposes the result.

Callers

nothing calls this directly

Calls 1

mapFunction · 0.70

Tested by

no test coverage detected