It is NOT recommended to create instances of Notification
directly.
Rather, try to create POJOs matching the signature outlined in ObservableNotification.
For example: { kind: 'N', value: 1 }
, { kind: 'E', error: new Error('bad') }
, or { kind: 'C' }
.
Will be removed in v8.
import { Notification } from "https://deno.land/x/rxjs@v1.0.2/mod.ts";
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
).
Constructors
Methods
Executes a notification on the appropriate handler from a list provided. If a handler is missing for the kind of notification, nothing is called and no error is thrown, it will be a noop.
Executes a notification on the appropriate handler from a list provided. If a handler is missing for the kind of notification, nothing is called and no error is thrown, it will be a noop.
Executes the next handler if the Notification is of kind
"N"
. Otherwise
this will not error, and it will be a noop.
Executes the appropriate handler on a passed observer
given the kind
of notification.
If the handler is missing it will do nothing. Even if the notification is an error, if
there is no error handler on the observer, an error will not be thrown, it will noop.
Executes a notification on the appropriate handler from a list provided. If a handler is missing for the kind of notification, nothing is called and no error is thrown, it will be a noop.
Executes a notification on the appropriate handler from a list provided. If a handler is missing for the kind of notification, nothing is called and no error is thrown, it will be a noop.
Executes the next handler if the Notification is of kind
"N"
. Otherwise
this will not error, and it will be a noop.
Executes the appropriate handler on a passed observer
given the kind
of notification.
If the handler is missing it will do nothing. Even if the notification is an error, if
there is no error handler on the observer, an error will not be thrown, it will noop.
Returns a simple Observable that just delivers the notification represented by this Notification instance.
Static Methods
A shortcut to create a Notification instance of the type complete
.
A shortcut to create a Notification instance of the type error
from a
given error.
A shortcut to create a Notification instance of the type next
from a
given value.