endWith
signature: endWith(an: Values): Observable
endWith(an: Values): ObservableEmit given value(s) on completion.
Examples
// RxJS v6+
import { endWith } from 'rxjs/operators';
import { of } from 'rxjs';
const source$ = of('Hello', 'Friend', 'Goodbye');
source$
// emit on completion
.pipe(endWith('Friend'))
// 'Hello', 'Friend', 'Goodbye', 'Friend'
.subscribe(console.log(val));Additional Resources
Last updated
Was this helpful?