Skip to main content

createErrorNotification

Types

function createErrorNotification<GError>(
error: GError,
): IErrorNotification<GError>

Definition

Creates an IErrorNotification.

Example

Emit a single 'error' Notification

const subscribe = single(createErrorNotification(new Error(`Custom Error`)));

subscribe((notification) => {
console.log(notification);
});

Output:

{ name: 'error', value: Error('Custom Error') }