source: trip-planner-front/node_modules/rxjs/_esm2015/internal/operators/finalize.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 616 bytes
Line 
1import { Subscriber } from '../Subscriber';
2import { Subscription } from '../Subscription';
3export function finalize(callback) {
4 return (source) => source.lift(new FinallyOperator(callback));
5}
6class FinallyOperator {
7 constructor(callback) {
8 this.callback = callback;
9 }
10 call(subscriber, source) {
11 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
12 }
13}
14class FinallySubscriber extends Subscriber {
15 constructor(destination, callback) {
16 super(destination);
17 this.add(new Subscription(callback));
18 }
19}
20//# sourceMappingURL=finalize.js.map
Note: See TracBrowser for help on using the repository browser.