Type alias Value<T>

Value<T>: ObservableNotification<T> & {
    handle: Handle;
}

The Value type helper extends the ObservableNotification type and describes the shape of all values emitted by any stream handled by the BusHandler. As those streams are Observables, which are dynamically combined through their hierarchical structure denoted by their corresponding Handles and therefore may emit from more than one Handle, each Value emitted by any bus contains its originating Handle.

Type Parameters

  • T

    The Bus Value type.

Type declaration

Example

Logging emitted Values:

import { BusHandler } from '@sgrud/bus';

const busHandler = new BusHandler();
busHandler.observe('io.github.sgrud').subscribe(console.log);
// { handle: 'io.github.sgrud.example', type: 'N', value: 'published' }

See

BusHandler

Generated using TypeDoc