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

Method constructor

packages/effect/src/internal/core.ts:591–601  ·  view source on GitHub ↗
(args: Record<string, any> | undefined)

Source from the content-addressed store, hash-verified

589 const plainArgsSymbol = Symbol.for("effect/Data/Error/plainArgs")
590 return class Base extends YieldableError {
591 constructor(args: Record<string, any> | undefined) {
592 super(args?.message, args?.cause ? { cause: args.cause } : undefined)
593 if (args) {
594 InternalRecord.assignProperties(this, args)
595 // @effect-diagnostics-next-line floatingEffect:off
596 Object.defineProperty(this, plainArgsSymbol, {
597 value: args,
598 enumerable: false
599 })
600 }
601 }
602 override toJSON() {
603 return { ...(this as any)[plainArgsSymbol], ...this }
604 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected