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

Function causeAnnotations

packages/effect/src/internal/effect.ts:227–239  ·  view source on GitHub ↗
(
  self: Cause.Cause<E>
)

Source from the content-addressed store, hash-verified

225
226/** @internal */
227export const causeAnnotations = <E>(
228 self: Cause.Cause<E>
229): Context.Context<never> => {
230 const map = new Map<string, unknown>()
231 for (const f of self.reasons) {
232 if (f.annotations.size > 0) {
233 for (const [key, value] of f.annotations) {
234 map.set(key, value)
235 }
236 }
237 }
238 return Context.makeUnsafe(map)
239}
240
241/** @internal */
242export const causeCombine: {

Callers

nothing calls this directly

Calls 1

setMethod · 0.65

Tested by

no test coverage detected