(self: A)
| 1485 | * @since 4.0.0 |
| 1486 | */ |
| 1487 | export 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. |