Home Manual Reference Source Repository
import {Cancellable} from 'ug-layout/events/Cancellable'
public class | source

Cancellable

Extends:

BusEvent<T> → Cancellable

An event that can be cancelled.

Method Summary

Public Methods
public

cancel()

Cancels the event.

public

results(): Observable<this>

Creates an observable that waits for the results of the event.

Public Methods

public cancel() source

Cancels the event. Only valid within the context of the wait method.

See:

public results(): Observable<this> source

Creates an observable that waits for the results of the event.

Return:

Observable<this>

Example:

const event = new Cancellable(null);

bus.emit(event);

event.results().subscribe(() => {
  // The event was successful and NOT cancelled.
});