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.
14 lines
728 B
14 lines
728 B
2 years ago
|
"use strict";
|
||
|
var ReplaySubject_1 = require('../ReplaySubject');
|
||
|
var multicast_1 = require('./multicast');
|
||
|
/* tslint:enable:max-line-length */
|
||
|
function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
|
||
|
if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
|
||
|
scheduler = selectorOrScheduler;
|
||
|
}
|
||
|
var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
|
||
|
var subject = new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler);
|
||
|
return function (source) { return multicast_1.multicast(function () { return subject; }, selector)(source); };
|
||
|
}
|
||
|
exports.publishReplay = publishReplay;
|
||
|
//# sourceMappingURL=publishReplay.js.map
|