endWith
signature: endWith(an: Values): Observable
endWith(an: Values): Observable
Emit given value(s) on completion.
:bulb: If you want to start with a value instead, check out startWith
!
:bulb: If you want to perform an action on completion, but do not want to emit a value, check out finalize
!
Examples
Example 1: Basic endWith example
( StackBlitz )
Example 2: endWith multiple values
( StackBlitz )
Example 3: Comparison to finalize
( StackBlitz )
Additional Resources
:newspaper: - Official docs
:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/endWith.ts
Last updated