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

Function causeAnnotations

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

Source from the content-addressed store, hash-verified

273
274/** @internal */
275export const causeAnnotations = <E>(
276 self: Cause.Cause<E>
277): Context.Context<never> => {
278 const map = new Map<string, unknown>()
279 for (const f of self.reasons) {
280 if (f.annotations.size > 0) {
281 for (const [key, value] of f.annotations) {
282 map.set(key, value)
283 }
284 }
285 }
286 return Context.makeUnsafe(map)
287}
288
289/** @internal */
290export const causeMap: {

Callers

nothing calls this directly

Calls 1

setMethod · 0.65

Tested by

no test coverage detected