Added ObservableStatic.from definition.

This commit is contained in:
Igor Oleinikov
2014-07-22 12:10:45 -07:00
parent 77615ebcf0
commit 68b8e0481f
+44
View File
@@ -396,6 +396,50 @@ declare module Rx {
defer<T>(observableFactory: () => Observable<T>): Observable<T>;
defer<T>(observableFactory: () => IPromise<T>): Observable<T>;
empty<T>(scheduler?: IScheduler): Observable<T>;
/**
* This method creates a new Observable sequence from an array object.
* @param array An array-like or iterable object to convert to an Observable sequence.
* @param mapFn Map function to call on every element of the array.
* @param [thisArg] The context to use calling the mapFn if provided.
* @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
*/
from<T, TResult>(array: T[], mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler);
/**
* This method creates a new Observable sequence from an array object.
* @param array An array-like or iterable object to convert to an Observable sequence.
* @param [mapFn] Map function to call on every element of the array.
* @param [thisArg] The context to use calling the mapFn if provided.
* @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
*/
from<T>(array: T[], mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler);
/**
* This method creates a new Observable sequence from an array-like object.
* @param array An array-like or iterable object to convert to an Observable sequence.
* @param mapFn Map function to call on every element of the array.
* @param [thisArg] The context to use calling the mapFn if provided.
* @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
*/
from<T, TResult>(array: { length: number; [index: number]: T; }, mapFn: (value: T, index: number) => TResult, thisArg?: any, scheduler?: IScheduler);
/**
* This method creates a new Observable sequence from an array-like object.
* @param array An array-like or iterable object to convert to an Observable sequence.
* @param [mapFn] Map function to call on every element of the array.
* @param [thisArg] The context to use calling the mapFn if provided.
* @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
*/
from<T>(array: { length: number; [index: number]: T; }, mapFn?: (value: T, index: number) => T, thisArg?: any, scheduler?: IScheduler);
/**
* This method creates a new Observable sequence from an array-like or iterable object.
* @param array An array-like or iterable object to convert to an Observable sequence.
* @param [mapFn] Map function to call on every element of the array.
* @param [thisArg] The context to use calling the mapFn if provided.
* @param [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread.
*/
from<T>(iterable: any, mapFn?: (value: any, index: number) => T, thisArg?: any, scheduler?: IScheduler);
fromArray<T>(array: T[], scheduler?: IScheduler): Observable<T>;
fromArray<T>(array: { length: number;[index: number]: T; }, scheduler?: IScheduler): Observable<T>;