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

Function handler

packages/effect/test/Effect.test.ts:4164–4167  ·  view source on GitHub ↗
(_outcome: unknown)

Source from the content-addressed store, hash-verified

4162
4163 it("passes only the outcome to handlers", () => {
4164 function handler(_outcome: unknown) {
4165 // eslint-disable-next-line prefer-rest-params
4166 return arguments.length
4167 }
4168 const options = { onFailure: handler, onSuccess: handler }
4169 for (const source of [Effect.succeed(1), Effect.fail("error")]) {
4170 assert.strictEqual(Effect.runSync(Effect.match(source, options)), 1)

Callers 15

http-router.tsFile · 0.50
makeHttpClientFunction · 0.50
makeHttpClientFunction · 0.50
makeHttpClientFunction · 0.50
makeClientFunction · 0.50
makeHttpClientFunction · 0.50
makeHttpClientFunction · 0.50
makeHttpClientFunction · 0.50
makeHttpClientFunction · 0.50
makeHttpClientFunction · 0.50
makeClientFunction · 0.50
runFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected