MCPcopy Create free account
hub / github.com/Effect-TS/effect / compose

Method compose

packages/effect/src/SchemaGetter.ts:82–90  ·  view source on GitHub ↗
(other: Getter<T2, T, R2>)

Source from the content-addressed store, hash-verified

80 return new Getter((oe, options) => this.run(oe, options).pipe(Effect.mapEager(Option.map(f))))
81 }
82 compose<T2, R2>(other: Getter<T2, T, R2>): Getter<T2, E, R | R2> {
83 if (isPassthrough(this)) {
84 return other as any
85 }
86 if (isPassthrough(other)) {
87 return this as any
88 }
89 return new Getter((oe, options) => this.run(oe, options).pipe(Effect.flatMapEager((ot) => other.run(ot, options))))
90 }
91}
92
93/**

Callers

nothing calls this directly

Calls 3

isPassthroughFunction · 0.85
pipeMethod · 0.65
runMethod · 0.45

Tested by

no test coverage detected