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

Function constructor

packages/effect/src/internal/core.ts:186–207  ·  view source on GitHub ↗
(
    _tag: Tag,
    annotations: ReadonlyMap<string, unknown>,
    originalError: unknown
  )

Source from the content-addressed store, hash-verified

184 readonly _tag: Tag
185
186 constructor(
187 _tag: Tag,
188 annotations: ReadonlyMap<string, unknown>,
189 originalError: unknown
190 ) {
191 this[CauseReasonTypeId] = CauseReasonTypeId
192 this._tag = _tag
193 if (
194 annotations !== constEmptyAnnotations && typeof originalError === "object" && originalError !== null &&
195 annotations.size > 0
196 ) {
197 const prevAnnotations = annotationsMap.get(originalError)
198 if (prevAnnotations) {
199 annotations = new Map([
200 ...prevAnnotations,
201 ...annotations
202 ])
203 }
204 annotationsMap.set(originalError, annotations)
205 }
206 this.annotations = annotations
207 }
208
209 annotate(
210 annotations: Context.Context<never>,

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected