SynchronizedRef overview
Added in v2.0.0
Table of contents
- constructors
- getters
- models
- symbols
- unsafe
- utils
constructors
make
Signature
export declare const make: <A>(value: A) => Effect.Effect<SynchronizedRef<A>>
Added in v2.0.0
getters
get
Signature
export declare const get: <A>(self: SynchronizedRef<A>) => Effect.Effect<A>
Added in v2.0.0
models
SynchronizedRef (interface)
Signature
export interface SynchronizedRef<in out A> extends SynchronizedRef.Variance<A>, Ref.Ref<A> {
modifyEffect<B, E, R>(f: (a: A) => Effect.Effect<readonly [B, A], E, R>): Effect.Effect<B, E, R>
readonly [Unify.typeSymbol]?: unknown
readonly [Unify.unifySymbol]?: SynchronizedRefUnify<this>
readonly [Unify.ignoreSymbol]?: SynchronizedRefUnifyIgnore
}
Added in v2.0.0
SynchronizedRefUnify (interface)
Signature
export interface SynchronizedRefUnify<A extends { [Unify.typeSymbol]?: any }> extends Ref.RefUnify<A> {
SynchronizedRef?: () => Extract<A[Unify.typeSymbol], SynchronizedRef<any>>
}
Added in v3.8.0
SynchronizedRefUnifyIgnore (interface)
Signature
export interface SynchronizedRefUnifyIgnore extends Ref.RefUnifyIgnore {
Ref?: true
}
Added in v3.8.0
symbols
SynchronizedRefTypeId
Signature
export declare const SynchronizedRefTypeId: typeof SynchronizedRefTypeId
Added in v2.0.0
SynchronizedRefTypeId (type alias)
Signature
export type SynchronizedRefTypeId = typeof SynchronizedRefTypeId
Added in v2.0.0
unsafe
unsafeMake
Signature
export declare const unsafeMake: <A>(value: A) => SynchronizedRef<A>
Added in v2.0.0
utils
SynchronizedRef (namespace)
Added in v2.0.0
Variance (interface)
Signature
export interface Variance<in out A> {
readonly [SynchronizedRefTypeId]: {
readonly _A: Types.Invariant<A>
}
}
Added in v2.0.0
getAndSet
Signature
export declare const getAndSet: {
<A>(value: A): (self: Ref.Ref<A>) => Effect.Effect<A>
<A>(self: Ref.Ref<A>, value: A): Effect.Effect<A>
}
Added in v2.0.0
getAndUpdate
Signature
export declare const getAndUpdate: {
<A>(f: (a: A) => A): (self: Ref.Ref<A>) => Effect.Effect<A>
<A>(self: Ref.Ref<A>, f: (a: A) => A): Effect.Effect<A>
}
Added in v2.0.0
getAndUpdateEffect
Signature
export declare const getAndUpdateEffect: {
<A, R, E>(f: (a: A) => Effect.Effect<A, E, R>): (self: SynchronizedRef<A>) => Effect.Effect<A, E, R>
<A, R, E>(self: SynchronizedRef<A>, f: (a: A) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R>
}
Added in v2.0.0
getAndUpdateSome
Signature
export declare const getAndUpdateSome: {
<A>(pf: (a: A) => Option.Option<A>): (self: Ref.Ref<A>) => Effect.Effect<A>
<A>(self: Ref.Ref<A>, pf: (a: A) => Option.Option<A>): Effect.Effect<A>
}
Added in v2.0.0
getAndUpdateSomeEffect
Signature
export declare const getAndUpdateSomeEffect: {
<A, R, E>(pf: (a: A) => Option.Option<Effect.Effect<A, E, R>>): (self: SynchronizedRef<A>) => Effect.Effect<A, E, R>
<A, R, E>(self: SynchronizedRef<A>, pf: (a: A) => Option.Option<Effect.Effect<A, E, R>>): Effect.Effect<A, E, R>
}
Added in v2.0.0
modify
Signature
export declare const modify: {
<A, B>(f: (a: A) => readonly [B, A]): (self: SynchronizedRef<A>) => Effect.Effect<B>
<A, B>(self: SynchronizedRef<A>, f: (a: A) => readonly [B, A]): Effect.Effect<B>
}
Added in v2.0.0
modifyEffect
Signature
export declare const modifyEffect: {
<A, B, E, R>(f: (a: A) => Effect.Effect<readonly [B, A], E, R>): (self: SynchronizedRef<A>) => Effect.Effect<B, E, R>
<A, B, E, R>(self: SynchronizedRef<A>, f: (a: A) => Effect.Effect<readonly [B, A], E, R>): Effect.Effect<B, E, R>
}
Added in v2.0.0
modifySome
Signature
export declare const modifySome: {
<B, A>(fallback: B, pf: (a: A) => Option.Option<readonly [B, A]>): (self: Ref.Ref<A>) => Effect.Effect<B>
<A, B>(self: Ref.Ref<A>, fallback: B, pf: (a: A) => Option.Option<readonly [B, A]>): Effect.Effect<B>
}
Added in v2.0.0
modifySomeEffect
Signature
export declare const modifySomeEffect: {
<A, B, R, E>(
fallback: B,
pf: (a: A) => Option.Option<Effect.Effect<readonly [B, A], E, R>>
): (self: SynchronizedRef<A>) => Effect.Effect<B, E, R>
<A, B, R, E>(
self: SynchronizedRef<A>,
fallback: B,
pf: (a: A) => Option.Option<Effect.Effect<readonly [B, A], E, R>>
): Effect.Effect<B, E, R>
}
Added in v2.0.0
set
Signature
export declare const set: {
<A>(value: A): (self: Ref.Ref<A>) => Effect.Effect<void>
<A>(self: Ref.Ref<A>, value: A): Effect.Effect<void>
}
Added in v2.0.0
setAndGet
Signature
export declare const setAndGet: {
<A>(value: A): (self: Ref.Ref<A>) => Effect.Effect<A>
<A>(self: Ref.Ref<A>, value: A): Effect.Effect<A>
}
Added in v2.0.0
update
Signature
export declare const update: {
<A>(f: (a: A) => A): (self: Ref.Ref<A>) => Effect.Effect<void>
<A>(self: Ref.Ref<A>, f: (a: A) => A): Effect.Effect<void>
}
Added in v2.0.0
updateAndGet
Signature
export declare const updateAndGet: {
<A>(f: (a: A) => A): (self: Ref.Ref<A>) => Effect.Effect<A>
<A>(self: Ref.Ref<A>, f: (a: A) => A): Effect.Effect<A>
}
Added in v2.0.0
updateAndGetEffect
Signature
export declare const updateAndGetEffect: {
<A, R, E>(f: (a: A) => Effect.Effect<A, E, R>): (self: SynchronizedRef<A>) => Effect.Effect<A, E, R>
<A, R, E>(self: SynchronizedRef<A>, f: (a: A) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R>
}
Added in v2.0.0
updateEffect
Signature
export declare const updateEffect: {
<A, R, E>(f: (a: A) => Effect.Effect<A, E, R>): (self: SynchronizedRef<A>) => Effect.Effect<void, E, R>
<A, R, E>(self: SynchronizedRef<A>, f: (a: A) => Effect.Effect<A, E, R>): Effect.Effect<void, E, R>
}
Added in v2.0.0
updateSome
Signature
export declare const updateSome: {
<A>(f: (a: A) => Option.Option<A>): (self: Ref.Ref<A>) => Effect.Effect<void>
<A>(self: Ref.Ref<A>, f: (a: A) => Option.Option<A>): Effect.Effect<void>
}
Added in v2.0.0
updateSomeAndGet
Signature
export declare const updateSomeAndGet: {
<A>(pf: (a: A) => Option.Option<A>): (self: Ref.Ref<A>) => Effect.Effect<A>
<A>(self: Ref.Ref<A>, pf: (a: A) => Option.Option<A>): Effect.Effect<A>
}
Added in v2.0.0
updateSomeAndGetEffect
Signature
export declare const updateSomeAndGetEffect: {
<A, R, E>(pf: (a: A) => Option.Option<Effect.Effect<A, E, R>>): (self: SynchronizedRef<A>) => Effect.Effect<A, E, R>
<A, R, E>(self: SynchronizedRef<A>, pf: (a: A) => Option.Option<Effect.Effect<A, E, R>>): Effect.Effect<A, E, R>
}
Added in v2.0.0
updateSomeEffect
Signature
export declare const updateSomeEffect: {
<A, R, E>(
pf: (a: A) => Option.Option<Effect.Effect<A, E, R>>
): (self: SynchronizedRef<A>) => Effect.Effect<void, E, R>
<A, R, E>(self: SynchronizedRef<A>, pf: (a: A) => Option.Option<Effect.Effect<A, E, R>>): Effect.Effect<void, E, R>
}
Added in v2.0.0