takeLast
signature: takeLast(count: number): Observable
takeLast(count: number): Observable
Emit the last n emitted values before completion
💡 If you want only the last emission from multiple observables, on completion of multiple observables, try forkJoin!
Examples
Example 1: take the last 2 emitted values before completion
( StackBlitz )
Additional Resources
takeLast 📰 - Official docs
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/takeLast.ts
Last updated