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

Function return

packages/effect/src/unstable/reactivity/Atom.ts:1881–1885  ·  view source on GitHub ↗
(result._tag === "Failure")

Source from the content-addressed store, hash-verified

1879const swrTimestamp = <A, E>(result: AsyncResult.AsyncResult<A, E>): Option.Option<number> => {
1880 if (result._tag === "Success") {
1881 return Option.some(result.timestamp)
1882 }
1883 if (result._tag === "Failure") {
1884 return Option.map(result.previousSuccess, (success) => success.timestamp)
1885 }
1886 return Option.none()
1887}
1888

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected