Skip to content
Effect Days 2026 Get your ticket

Subscribable

8 exports Added in v2.0.0 Source

Combinators

map

Added in v2.0.0 Source

Signature

declare const map: {
<A, B>(f: (a: NoInfer<A>) => B): <E, R>(fa: Subscribable<A, E, R>) => Subscribable<B, E, R>;
<A, E, R, B>(self: Subscribable<A, E, R>, f: (a: NoInfer<A>) => B): Subscribable<B, E, R>;
}

mapEffect

Added in v2.0.0 Source

Signature

declare const mapEffect: {
<A, B, E2, R2>(f: (a: NoInfer<A>) => Effect<B, E2, R2>): <E, R>(fa: Subscribable<A, E, R>) => Subscribable<B, E2 | E, R2 | R>;
<A, E, R, B, E2, R2>(self: Subscribable<A, E, R>, f: (a: NoInfer<A>) => Effect<B, E2, R2>): Subscribable<B, E | E2, R | R2>;
}

Constructors

make

Added in v2.0.0 Source

Signature

declare function make<A, E, R>(options: {
readonly changes: Stream<A, E, R>;
readonly get: Effect<A, E, R>;
}): Subscribable<A, E, R>

unwrap

Added in v2.0.0 Source

Signature

declare function unwrap<A, E, R, E1, R1>(effect: Effect<Subscribable<A, E, R>, E1, R1>): Subscribable<A, E | E1, R | R1>

Models

Subscribable interface

Added in v2.0.0 Source

Signature

interface Subscribable<A, E = never, R = never> extends Readable<A, E, R> {
readonly [TypeId]: typeof TypeId;
readonly changes: Stream<A, E, R>;
}

Refinements

Signature

declare function isSubscribable(u: unknown): u is Subscribable<unknown, unknown, unknown>

Type Ids

TypeId

Added in v2.0.0 Source

Signature

declare const TypeId: unique symbol

TypeId type

Added in v2.0.0 Source

Signature

type TypeId = typeof TypeId