You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
584 B

4 years ago
import { ReplaySubject } from '../ReplaySubject';
import { multicast } from './multicast';
export function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
scheduler = selectorOrScheduler;
}
const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
const subject = new ReplaySubject(bufferSize, windowTime, scheduler);
return (source) => multicast(() => subject, selector)(source);
}
//# sourceMappingURL=publishReplay.js.map