MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / toEffect

Function toEffect

packages/@contentlayer/utils/src/effect/These.ts:107–109  ·  view source on GitHub ↗
(self: These<E, A>)

Source from the content-addressed store, hash-verified

105
106/** Unpacks the provided `These` into a new `Effect` with errors as `E` and values as value/warning tuple */
107export const toEffect = <E, A>(self: These<E, A>): T.Effect<unknown, E, Tp.Tuple<[A, O.Option<E>]>> => {
108 return pipe(result(self), E.fold(T.fail, T.succeed))
109}
110
111export const effectUnwrapValue = <T, E1, E2, A>(effect: T.Effect<T, E1, These<E2, A>>): T.Effect<T, E1 | E2, A> => {
112 return pipe(

Callers

nothing calls this directly

Calls 1

resultFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…