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

Function eitherEncoded

packages/effect/src/Schema.ts:7372–7378  ·  view source on GitHub ↗
(
  right: Right,
  left: Left
)

Source from the content-addressed store, hash-verified

7370 }).annotations({ description: `LeftEncoded<${format(left)}>` })
7371
7372const eitherEncoded = <Right extends Schema.All, Left extends Schema.All>(
7373 right: Right,
7374 left: Left
7375) =>
7376 Union(rightEncoded(right), leftEncoded(left)).annotations({
7377 description: `EitherEncoded<${format(left)}, ${format(right)}>`
7378 })
7379
7380const eitherDecode = <R, L>(input: EitherEncoded<R, L>): either_.Either<R, L> =>
7381 input._tag === "Left" ? either_.left(input.left) : either_.right(input.right)

Callers 1

EitherFunction · 0.85

Calls 5

rightEncodedFunction · 0.85
leftEncodedFunction · 0.85
UnionFunction · 0.70
formatFunction · 0.70
annotationsMethod · 0.65

Tested by

no test coverage detected