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

Interface AtomContext

packages/effect/src/unstable/reactivity/Atom.ts:160–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 * @since 4.0.0
159 */
160export interface AtomContext {
161 <A>(atom: Atom<A>): A
162 get<A>(this: AtomContext, atom: Atom<A>): A
163 result<A, E>(this: AtomContext, atom: Atom<AsyncResult.AsyncResult<A, E>>, options?: {
164 readonly suspendOnWaiting?: boolean | undefined
165 }): Effect.Effect<A, E>
166 resultOnce<A, E>(this: AtomContext, atom: Atom<AsyncResult.AsyncResult<A, E>>, options?: {
167 readonly suspendOnWaiting?: boolean | undefined
168 }): Effect.Effect<A, E>
169 once<A>(this: AtomContext, atom: Atom<A>): A
170 addFinalizer(this: AtomContext, f: () => void): void
171 mount<A>(this: AtomContext, atom: Atom<A>): void
172 refresh<A>(this: AtomContext, atom: Atom<A>): void
173 refreshSelf(this: AtomContext): void
174 self<A>(this: AtomContext): Option.Option<A>
175 setSelf<A>(this: AtomContext, a: A): void
176 set<R, W>(this: AtomContext, atom: Writable<R, W>, value: W): void
177 setResult<A, E, W>(this: AtomContext, atom: Writable<AsyncResult.AsyncResult<A, E>, W>, value: W): Effect.Effect<A, E>
178 some<A>(this: AtomContext, atom: Atom<Option.Option<A>>): Effect.Effect<A>
179 someOnce<A>(this: AtomContext, atom: Atom<Option.Option<A>>): Effect.Effect<A>
180 stream<A>(this: AtomContext, atom: Atom<A>, options?: {
181 readonly withoutInitialValue?: boolean
182 readonly bufferSize?: number
183 }): Stream.Stream<A>
184 streamResult<A, E>(this: AtomContext, atom: Atom<AsyncResult.AsyncResult<A, E>>, options?: {
185 readonly withoutInitialValue?: boolean
186 readonly bufferSize?: number
187 }): Stream.Stream<A, E>
188 subscribe<A>(this: AtomContext, atom: Atom<A>, f: (_: A) => void, options?: {
189 readonly immediate?: boolean
190 }): void
191 readonly registry: Registry.AtomRegistry
192}
193
194/**
195 * Context passed to writable atom write functions for reading atoms, refreshing or setting the current atom, and writing to other writable atoms.

Callers 96

parseValueMethod · 0.65
parseInlineValueMethod · 0.65
executeMiddlewareFunction · 0.65
addResponseAlternativeFunction · 0.65
layerFunction · 0.65
decodePayloadFunction · 0.65
makeSecurityMiddlewareFunction · 0.65
runWithFunction · 0.65
bodyFunction · 0.65
Atom.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected