MCPcopy Index your code
hub / github.com/Effect-TS/effect / transposeOption

Function transposeOption

packages/effect/src/Either.ts:992–996  ·  view source on GitHub ↗
(
  self: Option<Either<A, E>>
)

Source from the content-addressed store, hash-verified

990 * @category Optional Wrapping & Unwrapping
991 */
992export const transposeOption = <A = never, E = never>(
993 self: Option<Either<A, E>>
994): Either<Option<A>, E> => {
995 return option_.isNone(self) ? right(option_.none) : map(self.value, option_.some)
996}
997
998/**
999 * Applies an `Either` on an `Option` and transposes the result.

Callers

nothing calls this directly

Calls 2

mapFunction · 0.70
rightFunction · 0.50

Tested by

no test coverage detected