fr.lteconsulting.angular2gwt.client.interop.angular.rxjs.Observable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of angular2-gwt Show documentation
Show all versions of angular2-gwt Show documentation
Allows to develop Angular 2 applications with GWT
package fr.lteconsulting.angular2gwt.client.interop.angular.rxjs;
import fr.lteconsulting.angular2gwt.client.JsArray;
import fr.lteconsulting.angular2gwt.client.interop.promise.Promise;
import jsinterop.annotations.JsFunction;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType;
@JsType( isNative = true, namespace = "ng.rxjs", name = "Observable" )
public class Observable
{
public native void forEach( ForEachCallback callback );
@JsFunction
@FunctionalInterface
public interface ForEachCallback
{
void execute( T value );
}
public native Subscription subscribe( Observer observer );
public native Observable map( MapFunction mapFunction );
public native Promise toPromise();
public native Observable debounceTime( int time );
public native Observable distinctUntilChanged();
public native Observable distinctUntilChanged( KeySelector keySelector );
public native Observable distinctUntilChanged( KeySelector keySelector, KeyComparator keyComparator );
@JsMethod( namespace = "ng.rxjs.Observable", name = "of" )
public static native Observable> of( JsArray elements );
@JsFunction
@FunctionalInterface
public interface KeySelector
{
O selectKey( T item );
}
@JsFunction
@FunctionalInterface
public interface KeyComparator
{
boolean selectKey( O a, O b );
}
public native Observable switchMap( Projection projection );
public native Observable switchMap( Projection projection, ResultSelector resultSelector );
@JsFunction
@FunctionalInterface
public interface Projection
{
Observable project( T item, int index );
}
@JsFunction
@FunctionalInterface
public interface ResultSelector
{
R selectResult( T outerValue, I innerValue, int outerIndex, int innerIndex );
}
@JsMethod( name = "catch" )
public native Observable onError( ErrorCatcher errorCatcher );
@JsFunction
@FunctionalInterface
public interface ErrorCatcher
{
Observable catchError( Object error );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy