( getContext: () => Layer.Layer<R, never, never>, memoMap: Layer.MemoMap )
| 193 | self: Atom.Atom<AsyncResult.AsyncResult<A, E>> |
| 194 | ): Atom.Atom<AsyncResult.AsyncResult<A, E>> => |
| 195 | Atom.transform(self, (get) => { |
| 196 | const next = get(self) |
| 197 | if (next._tag !== "Success") return next |
| 198 | const prev = Option.flatMap(get.self<AsyncResult.AsyncResult<A, E>>(), AsyncResult.value) |
| 199 | if (Option.isNone(prev)) return next |
| 200 | const shared = replaceEqualDeep(prev.value, next.value) |
| 201 | return shared === next.value |
| 202 | ? next |
| 203 | : AsyncResult.success(shared, { waiting: next.waiting, timestamp: next.timestamp }) |
| 204 | }, { initialValueTarget: self }) |
| 205 |
searching dependent graphs…