Skip to main content Link Search Menu Expand Document (external link)

Subscribable overview

Added in v2.0.0


Table of contents


combinators

map

Signature

export 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>
}

Added in v2.0.0

mapEffect

Signature

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

Added in v2.0.0

constructors

make

Signature

export declare const make: <A, E, R>(options: {
  readonly get: Effect.Effect<A, E, R>
  readonly changes: Stream.Stream<A, E, R>
}) => Subscribable<A, E, R>

Added in v2.0.0

unwrap

Signature

export declare const unwrap: <A, E, R, E1, R1>(
  effect: Effect.Effect<Subscribable<A, E, R>, E1, R1>
) => Subscribable<A, E | E1, R | R1>

Added in v2.0.0

models

Subscribable (interface)

Signature

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

Added in v2.0.0

refinements

isSubscribable

Signature

export declare const isSubscribable: (u: unknown) => u is Subscribable<unknown, unknown, unknown>

Added in v2.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v2.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v2.0.0