"use strict"; var tap_1 = require('../operators/tap'); /* tslint:enable:max-line-length */ /** * Perform a side effect for every emission on the source Observable, but return * an Observable that is identical to the source. * * Intercepts each emission on the source and runs a * function, but returns an output which is identical to the source as long as errors don't occur. * * * * Returns a mirrored Observable of the source Observable, but modified so that * the provided Observer is called to perform a side effect for every value, * error, and completion emitted by the source. Any errors that are thrown in * the aforementioned Observer or handlers are safely sent down the error path * of the output Observable. * * This operator is useful for debugging your Observables for the correct values * or performing other side effects. * * Note: this is different to a `subscribe` on the Observable. If the Observable * returned by `do` is not subscribed, the side effects specified by the * Observer will never happen. `do` therefore simply spies on existing * execution, it does not trigger an execution to happen like `subscribe` does. * * @example