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

Function keepAlive

packages/effect/src/unstable/reactivity/Atom.ts:1487–1491  ·  view source on GitHub ↗
(self: A)

Source from the content-addressed store, hash-verified

1485 * @since 4.0.0
1486 */
1487export const keepAlive = <A extends Atom<any>>(self: A): A =>
1488 Object.assign(Object.create(Object.getPrototypeOf(self)), {
1489 ...self,
1490 keepAlive: true
1491 })
1492
1493/**
1494 * Allows a reactive value to be disposed of when it is not in use.

Callers

nothing calls this directly

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected