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

Function left

packages/effect/test/Schema/SchemaTest.ts:299–307  ·  view source on GitHub ↗

* Verifies that the either is a `Left` with the expected value.

(either: Either.Either<R, L>, left: L)

Source from the content-addressed store, hash-verified

297 * Verifies that the either is a `Left` with the expected value.
298 */
299 left<R, const L>(either: Either.Either<R, L>, left: L) {
300 if (Either.isLeft(either)) {
301 deepStrictEqual(either.left, left)
302 } else {
303 // eslint-disable-next-line no-console
304 console.log(either.right)
305 fail(`expected a Left, got a Right: ${either.right}`)
306 }
307 },
308
309 /**
310 * Verifies that the either is a left with the expected value.

Callers

nothing calls this directly

Calls 3

failFunction · 0.70
logMethod · 0.65
deepStrictEqualFunction · 0.50

Tested by

no test coverage detected