Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

§Classes

AsyncSubject

A variant of Subject that only emits a value when it completes. It will emit its latest value to all its observers on completion.

BehaviorSubject

A variant of Subject that requires an initial value and emits its current value whenever it is subscribed to.

ConnectableObservable deprecated
Notification deprecated

Represents a push-based event or value that an Observable can emit. This class is particularly useful for operators that manage notifications, like materialize, dematerialize, observeOn, and others. Besides wrapping the actual delivered value, it also annotates it with metadata of, for instance, what type of push message it is (next, error, or complete).

Observable

A representation of any set of values over any amount of time. This is the most basic building block of RxJS.

ReplaySubject

A variant of Subject that "replays" old values to new subscribers by emitting them when they first subscribe.

Scheduler deprecated

An execution context and a data structure to order tasks and schedule their execution. Provides a notion of (potentially virtual) time, through the now() getter method.

Subject

A Subject is a special type of Observable that allows values to be multicasted to many Observers. Subjects are like EventEmitters.

Subscriber

Implements the Observer interface and extends the Subscription class. While the Observer is the public API for consuming the values of an Observable, all Observers get converted to a Subscriber, in order to provide Subscription-like capabilities such as unsubscribe. Subscriber is a common type in RxJS, and crucial for implementing operators, but it is rarely used as a public API.

Subscription

Represents a disposable resource, such as the execution of an Observable. A Subscription has one important method, unsubscribe, that takes no argument and just disposes the resource held by the subscription.

VirtualAction
VirtualTimeScheduler

§Enums

NotificationKind deprecated

§Variables

animationFrame deprecated
animationFrameScheduler

Animation Frame Scheduler

ArgumentOutOfRangeError

An error thrown when an element was queried at a certain index of an Observable, but no such index or position exists in that sequence.

asap deprecated
asapScheduler

Asap Scheduler

async deprecated
asyncScheduler

Async Scheduler

combineAll deprecated
config

The GlobalConfig object for RxJS. It is used to configure things like how to react on unhandled errors.

EMPTY

A simple Observable that emits no items to the Observer and immediately emits a complete notification.

EmptyError

An error thrown when an Observable or a sequence was queried but has no elements.

exhaust deprecated
flatMap deprecated
NEVER

An Observable that emits no items to the Observer and never completes.

NotFoundError

An error thrown when a value or values are missing from an observable sequence.

ObjectUnsubscribedError

An error thrown when an action is invalid because the object has been unsubscribed.

observable deprecated

Symbol.observable or a string "@@observable". Used for interop

queue deprecated
queueScheduler

Queue Scheduler

SequenceError

An error thrown when something is wrong with the sequence of values arriving on the observable.

TimeoutError

An error thrown by the timeout operator.

UnsubscriptionError

An error thrown when one or more errors have occurred during the unsubscribe of a Subscription.

§Functions

animationFrames

An observable of animation frames

audit

Ignores source values for a duration determined by another Observable, then emits the most recent value from the source Observable, then repeats this process.

auditTime

Ignores source values for duration milliseconds, then emits the most recent value from the source Observable, then repeats this process.

bindCallback
bindNodeCallback
buffer

Buffers the source Observable values until closingNotifier emits.

bufferCount

Buffers the source Observable values until the size hits the maximum bufferSize given.

bufferTime
bufferToggle

Buffers the source Observable values starting from an emission from openings and ending when the output of closingSelector emits.

bufferWhen

Buffers the source Observable values, using a factory function of closing Observables to determine when to close, emit, and reset the buffer.

catchError
combineLatest

You have passed any here, we can't figure out if it is an array or an object, so you're getting unknown. Use better types.

combineLatestAll
combineLatestWith

Create an observable that combines the latest values from all passed observables and the source into arrays and emits them.

concat
concatAll

Converts a higher-order Observable into a first-order Observable by concatenating the inner Observables in order.

concatMap
concatMapTo deprecated
concatWith

Emits all of the values from the source observable, then, once it completes, subscribes to each observable source provided, one at a time, emitting all of their values, and not subscribing to the next one until it completes.

connect

Creates an observable by multicasting the source within a function that allows the developer to define the usage of the multicast prior to connection.

connectable

Creates an observable that multicasts once connect() is called on it.

count

Counts the number of emissions on the source and emits that number when the source completes.

debounce

Emits a notification from the source Observable only after a particular time span determined by another Observable has passed without another source emission.

debounceTime

Emits a notification from the source Observable only after a particular time span has passed without another source emission.

defaultIfEmpty

Emits a given value if the source Observable completes without emitting any next value, otherwise mirrors the source Observable.

defer

Creates an Observable that, on subscribe, calls an Observable factory to make an Observable for each new Observer.

delay

Delays the emission of items from the source Observable by a given timeout or until a given Date.

delayWhen deprecated
dematerialize

Converts an Observable of ObservableNotification objects into the emissions that they represent.

distinct

Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.

distinctUntilChanged
distinctUntilKeyChanged
elementAt

Emits the single value at the specified index in a sequence of emissions from the source Observable.

empty deprecated
endWith deprecated
every
exhaustAll

Converts a higher-order Observable into a first-order Observable by dropping inner Observables while the previous inner Observable has not yet completed.

exhaustMap
expand
filter deprecated
finalize

Returns an Observable that mirrors the source Observable, but will call a specified function when the source terminates on complete or error. The specified function will also be called when the subscriber explicitly unsubscribes.

find
findIndex
first
firstValueFrom
forkJoin

You have passed any here, we can't figure out if it is an array or an object, so you're getting unknown. Use better types.

from
fromEvent
fromEventPattern
generate deprecated

Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages.

groupBy
identity

This function takes one parameter and just returns it. Simply put, this is like <T>(x: T): T => x.

ignoreElements

Ignores all items emitted by the source Observable and only passes calls of complete or error.

iif

Checks a boolean at subscription time, and chooses between one of two observable sources

interval

Creates an Observable that emits sequential numbers every specified interval of time, on a specified SchedulerLike.

isEmpty

Emits false if the input Observable emits any values, or emits true if the input Observable completes without emitting any values.

isObservable

Tests to see if the object is an RxJS Observable

last
lastValueFrom
map
mapTo deprecated
materialize

Represents all of the notifications from the source Observable as next emissions marked with their original types within Notification objects.

max

The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), and when source Observable completes it emits a single item: the item with the largest value.

merge
mergeAll

Converts a higher-order Observable into a first-order Observable which concurrently delivers all values that are emitted on the inner Observables.

mergeMap
mergeMapTo deprecated
mergeScan

Applies an accumulator function over the source Observable where the accumulator function itself returns an Observable, then each intermediate Observable returned is merged into the output Observable.

mergeWith

Merge the values from all observables to a single observable result.

min

The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), and when source Observable completes it emits a single item: the item with the smallest value.

multicast deprecated

An operator that creates a ConnectableObservable, that when connected, with the connect method, will use the provided subject to multicast the values from the source to all consumers.

never deprecated
noop
observeOn

Re-emits all notifications from source Observable with specified scheduler.

of
onErrorResumeNext
onErrorResumeNextWith
pairs deprecated
pairwise

Groups pairs of consecutive emissions together and emits them as an array of two values.

partition deprecated
pipe
pluck deprecated
publish deprecated

Returns a connectable observable that, when connected, will multicast all values through a single underlying Subject instance.

publishBehavior deprecated

Creates a ConnectableObservable that utilizes a BehaviorSubject.

publishLast deprecated

Returns a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification.

publishReplay deprecated

Creates a ConnectableObservable that uses a ReplaySubject internally.

race
raceWith

Creates an Observable that mirrors the first source Observable to emit a next, error or complete notification from the combination of the Observable to which the operator is applied and supplied Observables.

range
reduce
refCount deprecated

Make a ConnectableObservable behave like a ordinary observable and automates the way you can connect to it.

repeat

Returns an Observable that will resubscribe to the source stream when the source stream completes.

repeatWhen deprecated

Returns an Observable that mirrors the source Observable with the exception of a complete. If the source Observable calls complete, this method will emit to the Observable returned from notifier. If that Observable calls complete or error, then this method will call complete or error on the child subscription. Otherwise this method will resubscribe to the source Observable.

retry
retryWhen deprecated

Returns an Observable that mirrors the source Observable with the exception of an error. If the source Observable calls error, this method will emit the Throwable that caused the error to the ObservableInput returned from notifier. If that Observable calls complete or error then this method will call complete or error on the child subscription. Otherwise this method will resubscribe to the source Observable.

sample

Emits the most recently emitted value from the source Observable whenever another Observable, the notifier, emits.

sampleTime

Emits the most recently emitted value from the source Observable within periodic time intervals.

scan
scheduled

Converts from a common ObservableInput type to an observable where subscription and emissions are scheduled on the provided scheduler.

sequenceEqual

Compares all values of two observables in sequence using an optional comparator function and returns an observable of a single boolean value representing whether or not the two sequences are equal.

share
shareReplay
single
skip

Returns an Observable that skips the first count items emitted by the source Observable.

skipLast

Skip a specified number of values before the completion of an observable.

skipUntil

Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.

skipWhile
startWith
subscribeOn

Asynchronously subscribes Observers to this Observable on the specified SchedulerLike.

switchAll

Converts a higher-order Observable into a first-order Observable producing values only from the most recent observable sequence

switchMap
switchMapTo deprecated
switchScan

Applies an accumulator function over the source Observable where the accumulator function itself returns an Observable, emitting values only from the most recently returned Observable.

take

Emits only the first count values emitted by the source Observable.

takeLast

Waits for the source to complete, then emits the last N values from the source, as specified by the count argument.

takeUntil

Emits the values emitted by the source Observable until a notifier Observable emits a value.

takeWhile
tap
throttle

Emits a value from the source Observable, then ignores subsequent source values for a duration determined by another Observable, then repeats this process.

throttleTime

Emits a value from the source Observable, then ignores subsequent source values for duration milliseconds, then repeats this process.

throwError

Creates an observable that will create an error instance and push it to the consumer as an error immediately upon subscription.

throwIfEmpty

If the source observable completes without emitting a value, it will emit an error. The error will be created at that time by the optional errorFactory argument, otherwise, the error will be EmptyError.

timeInterval

Emits an object containing the current value, and the time that has passed between emitting the current value and the previous value, which is calculated by using the provided scheduler's now() method to retrieve the current time at each emission, then calculating the difference. The scheduler defaults to asyncScheduler, so by default, the interval will be in milliseconds.

timeout

If with is provided, this will return an observable that will switch to a different observable if the source does not push values within the specified time parameters.

timeoutWith deprecated
timer

Creates an observable that will wait for a specified time period, or exact date, before emitting the number 0.

timestamp

Attaches a timestamp to each item emitted by an observable indicating when it was emitted

toArray

Collects all source emissions and emits them as an array when the source completes.

using

Creates an Observable that uses a resource which will be disposed at the same time as the Observable.

window

Branch out the source Observable values as a nested Observable whenever windowBoundaries emits.

windowCount

Branch out the source Observable values as a nested Observable with each nested Observable emitting at most windowSize values.

windowTime
windowToggle

Branch out the source Observable values as a nested Observable starting from an emission from openings and ending when the output of closingSelector emits.

windowWhen

Branch out the source Observable values as a nested Observable using a factory function of closing Observables to determine when to start a new window.

withLatestFrom
zip
zipAll

Collects all observable inner sources from the source, once the source completes, it will subscribe to all inner sources, combining their values by index and emitting them.

zipWith

Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays.

§Interfaces

ArgumentOutOfRangeError
BasicGroupByOptions
CompleteNotification

A notification representing a "completion" from an observable. Can be used with dematerialize.

CompletionObserver
Connectable

An observable with a connect method that is used to create a subscription to an underlying source, connecting it with all consumers via a multicast.

ConnectConfig

An object used to configure connect operator.

EmptyError
ErrorNotification

A notification representing an "error" from an observable. Can be used with dematerialize.

ErrorObserver
GlobalConfig

The global configuration object for RxJS, used to configure things like how to react on unhandled errors. Accessible via config object.

GroupByOptionsWithElement
GroupedObservable

An observable of values that is the emitted by the result of a groupBy operator, contains a key property for the grouping.

InteropObservable

An object that implements the Symbol.observable interface.

MonoTypeOperatorFunction
NextNotification

A notification representing a "next" from an observable. Can be used with dematerialize.

NextObserver

OBSERVER INTERFACES

NotFoundError
ObjectUnsubscribedError
Observer
Operator deprecated
OperatorFunction
ReadableStreamLike

The base signature RxJS will look for to identify and use a ReadableStream as an ObservableInput source.

RepeatConfig
RetryConfig

The retry operator configuration object. retry either accepts a number or an object described by this interface.

SchedulerAction
SchedulerLike

SCHEDULER INTERFACES

SequenceError
ShareConfig
ShareReplayConfig
SubjectLike
Subscribable

OBSERVABLE INTERFACES

SubscriptionLike
ThrottleConfig
TimeInterval

A value emitted and the amount of time since the last value was emitted.

TimeoutConfig
TimeoutError

An error emitted when a timeout occurs.

TimeoutInfo
Timestamp

A value and the time at which it was emitted.

TimestampProvider

This is a type that provides a method to allow RxJS to create a numeric timestamp

UnaryFunction

OPERATOR INTERFACES

Unsubscribable

SUBSCRIPTION INTERFACES

UnsubscriptionError

§Type Aliases

Cons

Constructs a new tuple with the specified type at the head. If you declare Cons<A, [B, C]> you will get back [A, B, C].

FactoryOrValue
Falsy

A simple type to represent a gamut of "falsy" values... with a notable exception: NaN is "falsy" however, it is not and cannot be typed via TypeScript. See comments here: https://github.com/microsoft/TypeScript/issues/28682#issuecomment-707142417

Head

Extracts the head of a tuple. If you declare Head<[A, B, C]> you will get back A.

ObservableInput

Valid types that can be converted to observables.

ObservableInputTuple

Used to infer types from arguments to functions like forkJoin. So that you can have forkJoin([Observable<A>, PromiseLike<B>]): Observable<[A, B]> et al.

ObservableLike deprecated
ObservableNotification

Valid observable notification types.

ObservedValueOf

Extracts the type from an ObservableInput<any>. If you have O extends ObservableInput<any> and you pass in Observable<number>, or Promise<number>, etc, it will type as number.

ObservedValuesFromArray deprecated
ObservedValueTupleFromArray

Extracts a tuple of element types from an ObservableInput<any>[]. If you have O extends ObservableInput<any>[] and you pass in [Observable<string>, Observable<number>] you would get back a type of [string, number].

ObservedValueUnionFromArray

Extracts a union of element types from an ObservableInput<any>[]. If you have O extends ObservableInput<any>[] and you pass in Observable<string>[] or Promise<string>[] you would get back a type of string. If you pass in [Observable<string>, Observable<number>] you would get back a type of string | number.

PartialObserver
SubscribableOrPromise deprecated
Tail

Extracts the tail of a tuple. If you declare Tail<[A, B, C]> you will get back [B, C].

TeardownLogic
TruthyTypesOf
ValueFromArray

Extracts the generic value from an Array type. If you have T extends Array<any>, and pass a string[] to it, ValueFromArray<T> will return the actual type of string.

ValueFromNotification

Gets the value type from an ObservableNotification, if possible.