@@ -2,13 +2,29 @@ import { Observable } from '../Observable';
2
2
import { Operator } from '../Operator' ;
3
3
import { Subscriber } from '../Subscriber' ;
4
4
import { EmptyError } from '../util/EmptyError' ;
5
- import { MonoTypeOperatorFunction } from '../../internal/types' ;
5
+ import { MonoTypeOperatorFunction , OperatorFunction } from '../../internal/types' ;
6
6
import { filter } from './filter' ;
7
7
import { takeLast } from './takeLast' ;
8
8
import { throwIfEmpty } from './throwIfEmpty' ;
9
9
import { defaultIfEmpty } from './defaultIfEmpty' ;
10
10
import { identity } from '../util/identity' ;
11
11
12
+ /* tslint:disable:max-line-length */
13
+ export function last < T > ( ) : MonoTypeOperatorFunction < T > ;
14
+ export function last < T > (
15
+ predicate : null | undefined ,
16
+ defaultValue : T
17
+ ) : MonoTypeOperatorFunction < T > ;
18
+ export function last < T , S extends T > (
19
+ predicate ?: ( value : T , index : number , source : Observable < T > ) => value is S ,
20
+ defaultValue ?: T
21
+ ) : OperatorFunction < T , S > ;
22
+ export function last < T > (
23
+ predicate ?: ( value : T , index : number , source : Observable < T > ) => boolean ,
24
+ defaultValue ?: T
25
+ ) : MonoTypeOperatorFunction < T > ;
26
+ /* tslint:enable:max-line-length */
27
+
12
28
/**
13
29
* Returns an Observable that emits only the last item emitted by the source Observable.
14
30
* It optionally takes a predicate function as a parameter, in which case, rather than emitting
0 commit comments