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

Method set

packages/effect/src/unstable/reactivity/AtomRef.ts:180–187  ·  view source on GitHub ↗
(value: A)

Source from the content-addressed store, hash-verified

178 return new PropRefImpl(this, prop)
179 }
180 set(value: A) {
181 if (Equal.equals(value, this.value)) {
182 return this
183 }
184 this.value = value
185 this.notify(value)
186 return this
187 }
188
189 update(f: (value: A) => A) {
190 return this.set(f(this.value))

Callers 1

updateMethod · 0.95

Calls 2

equalsMethod · 0.80
notifyMethod · 0.45

Tested by

no test coverage detected