Bones/node_modules/rxjs/operator/elementAt.d.ts
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

10 lines
604 B
TypeScript

import { Observable } from '../Observable';
/**
* Returns an Observable that emits the item at the specified index in the source Observable.
* If default is given, missing indices will output this value on next; otherwise, outputs error.
* @param {number} index the index of the value to be retrieved.
* @param {any} [defaultValue] the default value returned for missing indices.
* @returns {Observable} an Observable that emits a single item, if it is found. Otherwise, will emit the default value if given.
*/
export declare function elementAt<T>(index: number, defaultValue?: T): Observable<T>;