Skip to main content
interface Observer
import { type Observer } from "https://deno.land/x/observable@v0.1-alpha/Observer.ts";

An Observer is used to receive data from an Observable, and is supplied as an argument to subscribe.

Type Parameters

optional
Value = unknown

Methods

optional
start(subscription: Subscription): void

Receives the subscription object when subscribe is called

optional
next(value: Value): void

Receives the next value in the sequence

optional
error(errorValue: unknown): void

Receives the next error in the sequence

optional
complete(): void

Receives a notification signaling that the sequence is completed