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

Method constructor

packages/effect/test/Optic.test.ts:39–41  ·  view source on GitHub ↗
(x: number)

Source from the content-addressed store, hash-verified

37 class A {
38 readonly x: number
39 constructor(x: number) {
40 this.x = x
41 }
42 }
43 const optic = Optic.id<A>().key("x")
44 throws(() => optic.replace(2, new A(1)), "Cannot clone object with non-Object constructor or null prototype")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected