/** * @since 4.0.0 */ import * as Arr from "../../Array.ts"; import * as Cause from "../../Cause.ts"; import * as Context from "../../Context.ts"; import * as Duration from "../../Duration.ts"; import * as Effect from "../../Effect.ts"; import type { LazyArg } from "../../Function.ts"; import type * as Inspectable from "../../Inspectable.ts"; import * as Layer from "../../Layer.ts"; import * as Option from "../../Option.ts"; import type { Pipeable } from "../../Pipeable.ts"; import type { ReadonlyRecord } from "../../Record.ts"; import * as Schema from "../../Schema.ts"; import * as Scope from "../../Scope.ts"; import * as Stream from "../../Stream.ts"; import * as SubscriptionRef from "../../SubscriptionRef.ts"; import type { NoInfer } from "../../Types.ts"; import * as KeyValueStore from "../persistence/KeyValueStore.ts"; import * as AsyncResult from "./AsyncResult.ts"; import { AtomRegistry } from "./AtomRegistry.ts"; import * as Registry from "./AtomRegistry.ts"; import * as Reactivity from "./Reactivity.ts"; /** * @since 4.0.0 * @category type ids */ export type TypeId = "~effect/reactivity/Atom"; /** * @since 4.0.0 * @category type ids */ export declare const TypeId: TypeId; /** * @since 4.0.0 * @category models */ export interface Atom extends Pipeable, Inspectable.Inspectable { readonly [TypeId]: TypeId; readonly keepAlive: boolean; readonly lazy: boolean; readonly read: (get: AtomContext) => A; readonly refresh?: (f: (atom: Atom) => void) => void; readonly label?: readonly [name: string, stack: string]; readonly idleTTL?: number; readonly initialValueTarget?: Atom; } /** * @since 4.0.0 * @category Guards */ export declare const isAtom: (u: unknown) => u is Atom; /** * @since 4.0.0 */ export type Type> = T extends Atom ? A : never; /** * @since 4.0.0 */ export type Success> = T extends Atom> ? A : never; /** * @since 4.0.0 */ export type PullSuccess> = T extends Atom> ? A : never; /** * @since 4.0.0 */ export type Failure> = T extends Atom> ? E : never; /** * @since 4.0.0 */ export type WithoutSerializable> = T extends Writable ? Writable : Atom>; /** * @since 4.0.0 * @category type ids */ export declare const WritableTypeId: WritableTypeId; /** * @since 4.0.0 * @category type ids */ export type WritableTypeId = "~effect/reactivity/Atom/Writable"; /** * @since 4.0.0 * @category models */ export interface Writable extends Atom { readonly [WritableTypeId]: WritableTypeId; readonly write: (ctx: WriteContext, value: W) => void; } /** * @since 4.0.0 * @category context */ export interface AtomContext { (atom: Atom): A; get(this: AtomContext, atom: Atom): A; result(this: AtomContext, atom: Atom>, options?: { readonly suspendOnWaiting?: boolean | undefined; }): Effect.Effect; resultOnce(this: AtomContext, atom: Atom>, options?: { readonly suspendOnWaiting?: boolean | undefined; }): Effect.Effect; once(this: AtomContext, atom: Atom): A; addFinalizer(this: AtomContext, f: () => void): void; mount(this: AtomContext, atom: Atom): void; refresh(this: AtomContext, atom: Atom): void; refreshSelf(this: AtomContext): void; self(this: AtomContext): Option.Option; setSelf(this: AtomContext, a: A): void; set(this: AtomContext, atom: Writable, value: W): void; setResult(this: AtomContext, atom: Writable, W>, value: W): Effect.Effect; some(this: AtomContext, atom: Atom>): Effect.Effect; someOnce(this: AtomContext, atom: Atom>): Effect.Effect; stream(this: AtomContext, atom: Atom, options?: { readonly withoutInitialValue?: boolean; readonly bufferSize?: number; }): Stream.Stream; streamResult(this: AtomContext, atom: Atom>, options?: { readonly withoutInitialValue?: boolean; readonly bufferSize?: number; }): Stream.Stream; subscribe(this: AtomContext, atom: Atom, f: (_: A) => void, options?: { readonly immediate?: boolean; }): void; readonly registry: Registry.AtomRegistry; } /** * @since 4.0.0 * @category context */ export interface WriteContext { get(this: WriteContext, atom: Atom): T; refreshSelf(this: WriteContext): void; setSelf(this: WriteContext, a: A): void; set(this: WriteContext, atom: Writable, value: W): void; } /** * @since 4.0.0 * @category combinators */ export declare const setIdleTTL: { /** * @since 4.0.0 * @category combinators */ (duration: Duration.Input): >(self: A) => A; /** * @since 4.0.0 * @category combinators */ >(self: A, duration: Duration.Input): A; }; /** * @since 4.0.0 * @category refinements */ export declare const isWritable: (atom: Atom) => atom is Writable; /** * @since 4.0.0 * @category constructors */ export declare const readable: (read: (get: AtomContext) => A, refresh?: (f: (atom: Atom) => void) => void) => Atom; /** * @since 4.0.0 * @category constructors */ export declare const writable: (read: (get: AtomContext) => R, write: (ctx: WriteContext, value: W) => void, refresh?: (f: (atom: Atom) => void) => void) => Writable; /** * @since 4.0.0 * @category constructors */ export declare const make: { /** * @since 4.0.0 * @category constructors */ (create: (get: AtomContext) => Effect.Effect, options?: { readonly initialValue?: A | undefined; readonly uninterruptible?: boolean | undefined; }): Atom>; /** * @since 4.0.0 * @category constructors */ (effect: Effect.Effect, options?: { readonly initialValue?: A; readonly uninterruptible?: boolean | undefined; }): Atom>; /** * @since 4.0.0 * @category constructors */ (create: (get: AtomContext) => Stream.Stream, options?: { readonly initialValue?: A; }): Atom>; /** * @since 4.0.0 * @category constructors */ (stream: Stream.Stream, options?: { readonly initialValue?: A; }): Atom>; /** * @since 4.0.0 * @category constructors */ (create: (get: AtomContext) => A): Atom; /** * @since 4.0.0 * @category constructors */ (initialValue: A): Writable; }; /** * @since 4.0.0 * @category models */ export interface AtomRuntime extends Atom, ER>> { readonly factory: RuntimeFactory; readonly layer: Atom>; readonly atom: { (create: (get: AtomContext) => Effect.Effect, options?: { readonly initialValue?: A; readonly uninterruptible?: boolean | undefined; }): Atom>; (effect: Effect.Effect, options?: { readonly initialValue?: A; readonly uninterruptible?: boolean | undefined; }): Atom>; (create: (get: AtomContext) => Stream.Stream, options?: { readonly initialValue?: A; }): Atom>; (stream: Stream.Stream, options?: { readonly initialValue?: A; }): Atom>; }; readonly fn: { (): { (fn: (arg: Arg, get: FnContext) => Effect.Effect, options?: { readonly initialValue?: A | undefined; readonly reactivityKeys?: ReadonlyArray | ReadonlyRecord> | undefined; readonly concurrent?: boolean | undefined; }): AtomResultFn; (fn: (arg: Arg, get: FnContext) => Stream.Stream, options?: { readonly initialValue?: A | undefined; readonly reactivityKeys?: ReadonlyArray | ReadonlyRecord> | undefined; readonly concurrent?: boolean | undefined; }): AtomResultFn; }; (fn: (arg: Arg, get: FnContext) => Effect.Effect, options?: { readonly initialValue?: A | undefined; readonly reactivityKeys?: ReadonlyArray | ReadonlyRecord> | undefined; readonly concurrent?: boolean | undefined; }): AtomResultFn; (fn: (arg: Arg, get: FnContext) => Stream.Stream, options?: { readonly initialValue?: A | undefined; readonly reactivityKeys?: ReadonlyArray | ReadonlyRecord> | undefined; readonly concurrent?: boolean | undefined; }): AtomResultFn; }; readonly pull: (create: ((get: AtomContext) => Stream.Stream) | Stream.Stream, options?: { readonly disableAccumulation?: boolean; readonly initialValue?: ReadonlyArray; }) => Writable, void>; readonly subscriptionRef: (create: Effect.Effect, E, Scope.Scope | R | AtomRegistry | Reactivity.Reactivity> | ((get: AtomContext) => Effect.Effect, E, Scope.Scope | R | AtomRegistry | Reactivity.Reactivity>)) => Writable, A>; } /** * @since 4.0.0 * @category models */ export interface RuntimeFactory { (create: Layer.Layer | ((get: AtomContext) => Layer.Layer)): AtomRuntime; readonly memoMap: Layer.MemoMap; readonly addGlobalLayer: (layer: Layer.Layer) => void; /** * Uses the `Reactivity` service from the runtime to refresh the atom whenever * the keys change. */ readonly withReactivity: (keys: ReadonlyArray | ReadonlyRecord>) => >(atom: A) => A; } /** * @since 4.0.0 * @category constructors */ export declare const context: (options: { readonly memoMap: Layer.MemoMap; }) => RuntimeFactory; /** * @since 4.0.0 * @category context */ export declare const defaultMemoMap: Layer.MemoMap; /** * @since 4.0.0 * @category context */ export declare const runtime: RuntimeFactory; /** * An alias to `Rx.runtime.withReactivity`, for refreshing an atom whenever the * keys change in the `Reactivity` service. * * @since 4.0.0 * @category Reactivity */ export declare const withReactivity: (keys: ReadonlyArray | ReadonlyRecord>) => >(atom: A) => A; /** * @since 4.0.0 * @category constructors */ export declare const subscriptionRef: { /** * @since 4.0.0 * @category constructors */ (ref: SubscriptionRef.SubscriptionRef | ((get: AtomContext) => SubscriptionRef.SubscriptionRef)): Writable; /** * @since 4.0.0 * @category constructors */ (effect: Effect.Effect, E, Scope.Scope | AtomRegistry> | ((get: AtomContext) => Effect.Effect, E, Scope.Scope | AtomRegistry>)): Writable, A>; }; /** * @since 4.0.0 * @category models */ export interface FnContext { (atom: Atom): A; result(this: FnContext, atom: Atom>, options?: { readonly suspendOnWaiting?: boolean | undefined; }): Effect.Effect; addFinalizer(this: FnContext, f: () => void): void; mount(this: FnContext, atom: Atom): void; refresh(this: FnContext, atom: Atom): void; self(this: FnContext): Option.Option; setSelf(this: FnContext, a: A): void; set(this: FnContext, atom: Writable, value: W): void; setResult(this: FnContext, atom: Writable, W>, value: W): Effect.Effect; some(this: FnContext, atom: Atom>): Effect.Effect; stream(this: FnContext, atom: Atom, options?: { readonly withoutInitialValue?: boolean; readonly bufferSize?: number; }): Stream.Stream; streamResult(this: FnContext, atom: Atom>, options?: { readonly withoutInitialValue?: boolean; readonly bufferSize?: number; }): Stream.Stream; subscribe(this: FnContext, atom: Atom, f: (_: A) => void, options?: { readonly immediate?: boolean; }): void; readonly registry: Registry.AtomRegistry; } /** * @since 4.0.0 * @category constructors */ export declare const fnSync: { /** * @since 4.0.0 * @category constructors */ (): { /** * @since 4.0.0 * @category constructors */ (f: (arg: Arg, get: FnContext) => A): Writable, Arg>; /** * @since 4.0.0 * @category constructors */ (f: (arg: Arg, get: FnContext) => A, options: { readonly initialValue: A; }): Writable; }; /** * @since 4.0.0 * @category constructors */ (f: (arg: Arg, get: FnContext) => A): Writable, Arg>; /** * @since 4.0.0 * @category constructors */ (f: (arg: Arg, get: FnContext) => A, options: { readonly initialValue: A; }): Writable; }; /** * @since 4.0.0 * @category models */ export interface AtomResultFn extends Writable, Arg | Reset | Interrupt> { } /** * @since 4.0.0 * @category symbols */ export declare const Reset: unique symbol; /** * @since 4.0.0 * @category symbols */ export type Reset = typeof Reset; /** * @since 4.0.0 * @category symbols */ export declare const Interrupt: unique symbol; /** * @since 4.0.0 * @category symbols */ export type Interrupt = typeof Interrupt; /** * @since 4.0.0 * @category constructors */ export declare const fn: { /** * @since 4.0.0 * @category constructors */ (): (fn: (arg: Arg, get: FnContext) => Effect.Effect, options?: { readonly initialValue?: A | undefined; readonly concurrent?: boolean | undefined; }) => AtomResultFn; /** * @since 4.0.0 * @category constructors */ (fn: (arg: Arg, get: FnContext) => Effect.Effect, options?: { readonly initialValue?: A | undefined; readonly concurrent?: boolean | undefined; }): AtomResultFn; /** * @since 4.0.0 * @category constructors */ (): (fn: (arg: Arg, get: FnContext) => Stream.Stream, options?: { readonly initialValue?: A | undefined; readonly concurrent?: boolean | undefined; }) => AtomResultFn; /** * @since 4.0.0 * @category constructors */ (fn: (arg: Arg, get: FnContext) => Stream.Stream, options?: { readonly initialValue?: A | undefined; readonly concurrent?: boolean | undefined; }): AtomResultFn; }; /** * @since 4.0.0 * @category models */ export type PullResult = AsyncResult.AsyncResult<{ readonly done: boolean; readonly items: Arr.NonEmptyArray; }, E | Cause.NoSuchElementError>; /** * @since 4.0.0 * @category constructors */ export declare const pull: (create: ((get: AtomContext) => Stream.Stream) | Stream.Stream, options?: { readonly disableAccumulation?: boolean | undefined; }) => Writable, void>; /** * @since 4.0.0 * @category constructors */ export declare const family: (f: (arg: Arg) => T) => (arg: Arg) => T; /** * @since 4.0.0 * @category combinators */ export declare const withFallback: { /** * @since 4.0.0 * @category combinators */ (fallback: Atom>): >>(self: R) => [R] extends [Writable] ? Writable> | A2, AsyncResult.AsyncResult.Failure> | E2>, RW> : Atom> | A2, AsyncResult.AsyncResult.Failure> | E2>>; /** * @since 4.0.0 * @category combinators */ >, A2, E2>(self: R, fallback: Atom>): [R] extends [Writable] ? Writable> | A2, AsyncResult.AsyncResult.Failure> | E2>, RW> : Atom> | A2, AsyncResult.AsyncResult.Failure> | E2>>; }; /** * @since 4.0.0 * @category combinators */ export declare const keepAlive: >(self: A) => A; /** * Reverts the `keepAlive` behavior of a reactive value, allowing it to be * disposed of when not in use. * * Note that Atom's have this behavior by default. * * @since 4.0.0 * @category combinators */ export declare const autoDispose: >(self: A) => A; /** * @since 4.0.0 * @category combinators */ export declare const setLazy: { /** * @since 4.0.0 * @category combinators */ (lazy: boolean): >(self: A) => A; /** * @since 4.0.0 * @category combinators */ >(self: A, lazy: boolean): A; }; /** * @since 4.0.0 * @category combinators */ export declare const withLabel: { /** * @since 4.0.0 * @category combinators */ (name: string): >(self: A) => A; /** * @since 4.0.0 * @category combinators */ >(self: A, name: string): A; }; /** * @since 4.0.0 * @category combinators */ export declare const initialValue: { /** * @since 4.0.0 * @category combinators */ (initialValue: A): (self: Atom) => readonly [Atom, A]; /** * @since 4.0.0 * @category combinators */ (self: Atom, initialValue: A): readonly [Atom, A]; }; /** * @since 4.0.0 * @category combinators */ export declare const transform: { /** * @since 4.0.0 * @category combinators */ , B>(f: (get: AtomContext, atom: R) => B, options?: { readonly initialValueTarget?: Atom | undefined; }): (self: R) => [R] extends [Writable] ? Writable : Atom; /** * @since 4.0.0 * @category combinators */ , B>(self: R, f: (get: AtomContext, atom: R) => B, options?: { readonly initialValueTarget?: Atom | undefined; }): [R] extends [Writable] ? Writable : Atom; }; /** * @since 4.0.0 * @category combinators */ export declare const map: { /** * @since 4.0.0 * @category combinators */ , B>(f: (_: Type) => B): (self: R) => [R] extends [Writable] ? Writable : Atom; /** * @since 4.0.0 * @category combinators */ , B>(self: R, f: (_: Type) => B): [R] extends [Writable] ? Writable : Atom; }; /** * @since 4.0.0 * @category combinators */ export declare const mapResult: { /** * @since 4.0.0 * @category combinators */ >, B>(f: (_: AsyncResult.AsyncResult.Success>) => B): (self: R) => [R] extends [Writable] ? Writable>>, RW> : Atom>>>; /** * @since 4.0.0 * @category combinators */ >, B>(self: R, f: (_: AsyncResult.AsyncResult.Success>) => B): [R] extends [Writable] ? Writable>>, RW> : Atom>>>; }; /** * @since 4.0.0 * @category combinators */ export declare const debounce: { /** * @since 4.0.0 * @category combinators */ (duration: Duration.Input): >(self: A) => WithoutSerializable; /** * @since 4.0.0 * @category combinators */ >(self: A, duration: Duration.Input): WithoutSerializable; }; /** * Ensures that the value of the atom is refreshed at most once per specified * duration. * * @since 4.0.0 * @category combinators */ export declare const withRefresh: { /** * Ensures that the value of the atom is refreshed at most once per specified * duration. * * @since 4.0.0 * @category combinators */ (duration: Duration.Input): >(self: A) => WithoutSerializable; /** * Ensures that the value of the atom is refreshed at most once per specified * duration. * * @since 4.0.0 * @category combinators */ >(self: A, duration: Duration.Input): WithoutSerializable; }; /** * Adds stale-while-revalidate refresh behavior to an async result atom. * * Automatic revalidation during reads is skipped while the current value is * fresh within `staleTime`. Manual `refresh` calls remain forceful and always * forward to the wrapped atom. * * Use `revalidateOnMount` to control whether stale data should trigger a * background refresh on first mount. Use `revalidateOnFocus` to control * focus behavior. `true` respects `staleTime` and `"always"` forces refetch. * * @since 4.0.0 * @category combinators */ export declare const swr: { /** * Adds stale-while-revalidate refresh behavior to an async result atom. * * Automatic revalidation during reads is skipped while the current value is * fresh within `staleTime`. Manual `refresh` calls remain forceful and always * forward to the wrapped atom. * * Use `revalidateOnMount` to control whether stale data should trigger a * background refresh on first mount. Use `revalidateOnFocus` to control * focus behavior. `true` respects `staleTime` and `"always"` forces refetch. * * @since 4.0.0 * @category combinators */ (options: { readonly staleTime: Duration.Input; readonly revalidateOnMount?: boolean | undefined; readonly revalidateOnFocus?: boolean | "always" | undefined; readonly focusSignal?: Atom | undefined; }): >>(self: R) => WithoutSerializable; /** * Adds stale-while-revalidate refresh behavior to an async result atom. * * Automatic revalidation during reads is skipped while the current value is * fresh within `staleTime`. Manual `refresh` calls remain forceful and always * forward to the wrapped atom. * * Use `revalidateOnMount` to control whether stale data should trigger a * background refresh on first mount. Use `revalidateOnFocus` to control * focus behavior. `true` respects `staleTime` and `"always"` forces refetch. * * @since 4.0.0 * @category combinators */ >>(self: R, options: { readonly staleTime: Duration.Input; readonly revalidateOnMount?: boolean | undefined; readonly revalidateOnFocus?: boolean | "always" | undefined; readonly focusSignal?: Atom | undefined; }): WithoutSerializable; }; /** * @since 4.0.0 * @category Optimistic */ export declare const optimistic: (self: Atom) => Writable>>; /** * @since 4.0.0 * @category Optimistic */ export declare const optimisticFn: { /** * @since 4.0.0 * @category Optimistic */ (options: { readonly reducer: (current: NoInfer, update: OW) => NoInfer; readonly fn: AtomResultFn | ((set: (result: NoInfer) => void) => AtomResultFn); }): (self: Writable>>) => AtomResultFn; /** * @since 4.0.0 * @category Optimistic */ (self: Writable>>, options: { readonly reducer: (current: NoInfer, update: OW) => NoInfer; readonly fn: AtomResultFn | ((set: (result: NoInfer) => void) => AtomResultFn); }): AtomResultFn; }; /** * @since 4.0.0 * @category batching */ export declare const batch: (f: () => void) => void; /** * @since 4.0.0 * @category Focus */ export declare const windowFocusSignal: Atom; /** * @since 4.0.0 * @category Focus */ export declare const makeRefreshOnSignal: <_>(signal: Atom<_>) => >(self: A) => WithoutSerializable; /** * @since 4.0.0 * @category Focus */ export declare const refreshOnWindowFocus: >(self: A) => WithoutSerializable; /** * @since 4.0.0 * @category KeyValueStore */ export declare const kvs: , const Mode extends "sync" | "async" = never>(options: { readonly runtime: AtomRuntime; readonly key: string; readonly schema: S; readonly defaultValue: LazyArg; readonly mode?: Mode | undefined; }) => Writable<"async" extends Mode ? AsyncResult.AsyncResult : S["Type"], S["Type"]>; /** * Create an Atom that reads and writes a URL search parameter. * * Note: If you pass a schema, it has to be synchronous and have no context. * * @since 4.0.0 * @category URL search params */ export declare const searchParam: = never>(name: string, options?: { readonly schema?: S | undefined; }) => Writable<[S] extends [never] ? string : Option.Option>; /** * @since 4.0.0 * @category Conversions */ export declare const toStream: (self: Atom) => Stream.Stream; /** * @since 4.0.0 * @category Conversions */ export declare const toStreamResult: (self: Atom>) => Stream.Stream; /** * @since 4.0.0 * @category Conversions */ export declare const get: (self: Atom) => Effect.Effect; /** * @since 4.0.0 * @category Conversions */ export declare const modify: { /** * @since 4.0.0 * @category Conversions */ (f: (_: R) => [returnValue: A, nextValue: W]): (self: Writable) => Effect.Effect; /** * @since 4.0.0 * @category Conversions */ (self: Writable, f: (_: R) => [returnValue: A, nextValue: W]): Effect.Effect; }; /** * @since 4.0.0 * @category Conversions */ export declare const set: { /** * @since 4.0.0 * @category Conversions */ (value: W): (self: Writable) => Effect.Effect; /** * @since 4.0.0 * @category Conversions */ (self: Writable, value: W): Effect.Effect; }; /** * @since 4.0.0 * @category Conversions */ export declare const update: { /** * @since 4.0.0 * @category Conversions */ (f: (_: R) => W): (self: Writable) => Effect.Effect; /** * @since 4.0.0 * @category Conversions */ (self: Writable, f: (_: R) => W): Effect.Effect; }; /** * @since 4.0.0 * @category Conversions */ export declare const getResult: (self: Atom>, options?: { readonly suspendOnWaiting?: boolean | undefined; }) => Effect.Effect; /** * @since 4.0.0 * @category Conversions */ export declare const refresh: (self: Atom) => Effect.Effect; /** * @since 4.0.0 * @category Conversions */ export declare const mount: (self: Atom) => Effect.Effect; /** * @since 4.0.0 * @category Serializable */ export declare const SerializableTypeId: SerializableTypeId; /** * @since 4.0.0 * @category Serializable */ export type SerializableTypeId = "~effect-atom/atom/Atom/Serializable"; /** * @since 4.0.0 * @category Serializable */ export interface Serializable { readonly [SerializableTypeId]: { readonly key: string; readonly encode: (value: S["Type"]) => S["Encoded"]; readonly decode: (value: S["Encoded"]) => S["Type"]; }; } /** * @since 4.0.0 * @category Serializable */ export declare const isSerializable: (self: Atom) => self is Atom & Serializable; /** * @since 4.0.0 * @category combinators */ export declare const serializable: { /** * @since 4.0.0 * @category combinators */ , S extends Schema.Codec, any>>(options: { readonly key: string; readonly schema: S; }): (self: R) => R & Serializable; /** * @since 4.0.0 * @category combinators */ , S extends Schema.Codec, any>>(self: R, options: { readonly key: string; readonly schema: S; }): R & Serializable; }; /** * @since 4.0.0 * @category ServerValue */ export declare const ServerValueTypeId: "~effect-atom/atom/Atom/ServerValue"; /** * Overrides the value of an Atom when read on the server. * * @since 4.0.0 * @category ServerValue */ export declare const withServerValue: { /** * Overrides the value of an Atom when read on the server. * * @since 4.0.0 * @category ServerValue */ >(read: (get: (atom: Atom) => A) => Type): (self: A) => A; /** * Overrides the value of an Atom when read on the server. * * @since 4.0.0 * @category ServerValue */ >(self: A, read: (get: (atom: Atom) => A) => Type): A; }; /** * Sets the Atom's server value to `Result.initial(true)`. * * @since 4.0.0 * @category ServerValue */ export declare const withServerValueInitial: >>(self: A) => A; /** * @since 4.0.0 * @category ServerValue */ export declare const getServerValue: { /** * @since 4.0.0 * @category ServerValue */ (registry: Registry.AtomRegistry): (self: Atom) => A; /** * @since 4.0.0 * @category ServerValue */ (self: Atom, registry: Registry.AtomRegistry): A; }; //# sourceMappingURL=Atom.d.ts.map