1 | import { Observable } from '../Observable';
|
2 | import { MonoTypeOperatorFunction, OperatorFunction, TimestampProvider, ObservableInput, ObservedValueOf } from '../types';
|
3 | /**
|
4 | * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject}
|
5 | * internally.
|
6 | *
|
7 | * @param bufferSize The buffer size for the underlying {@link ReplaySubject}.
|
8 | * @param windowTime The window time for the underlying {@link ReplaySubject}.
|
9 | * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}.
|
10 | * @deprecated Will be removed in v8. To create a connectable observable that uses a
|
11 | * {@link ReplaySubject} under the hood, use {@link connectable}.
|
12 | * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to
|
13 | * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`.
|
14 | * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead.
|
15 | * `publishReplay(size, time, scheduler), refCount()` is equivalent to
|
16 | * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`.
|
17 | * Details: https://rxjs.dev/deprecations/multicasting
|
18 | */
|
19 | export declare function publishReplay<T>(bufferSize?: number, windowTime?: number, timestampProvider?: TimestampProvider): MonoTypeOperatorFunction<T>;
|
20 | /**
|
21 | * Creates an observable, that when subscribed to, will create a {@link ReplaySubject},
|
22 | * and pass an observable from it (using [asObservable](api/index/class/Subject#asObservable)) to
|
23 | * the `selector` function, which then returns an observable that is subscribed to before
|
24 | * "connecting" the source to the internal `ReplaySubject`.
|
25 | *
|
26 | * Since this is deprecated, for additional details see the documentation for {@link connect}.
|
27 | *
|
28 | * @param bufferSize The buffer size for the underlying {@link ReplaySubject}.
|
29 | * @param windowTime The window time for the underlying {@link ReplaySubject}.
|
30 | * @param selector A function used to setup the multicast.
|
31 | * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}.
|
32 | * @deprecated Will be removed in v8. Use the {@link connect} operator instead.
|
33 | * `source.pipe(publishReplay(size, window, selector, scheduler))` is equivalent to
|
34 | * `source.pipe(connect(selector, { connector: () => new ReplaySubject(size, window, scheduler) }))`.
|
35 | * Details: https://rxjs.dev/deprecations/multicasting
|
36 | */
|
37 | export declare function publishReplay<T, O extends ObservableInput<any>>(bufferSize: number | undefined, windowTime: number | undefined, selector: (shared: Observable<T>) => O, timestampProvider?: TimestampProvider): OperatorFunction<T, ObservedValueOf<O>>;
|
38 | /**
|
39 | * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject}
|
40 | * internally.
|
41 | *
|
42 | * @param bufferSize The buffer size for the underlying {@link ReplaySubject}.
|
43 | * @param windowTime The window time for the underlying {@link ReplaySubject}.
|
44 | * @param selector Passing `undefined` here determines that this operator will return a {@link ConnectableObservable}.
|
45 | * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}.
|
46 | * @deprecated Will be removed in v8. To create a connectable observable that uses a
|
47 | * {@link ReplaySubject} under the hood, use {@link connectable}.
|
48 | * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to
|
49 | * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`.
|
50 | * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead.
|
51 | * `publishReplay(size, time, scheduler), refCount()` is equivalent to
|
52 | * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`.
|
53 | * Details: https://rxjs.dev/deprecations/multicasting
|
54 | */
|
55 | export declare function publishReplay<T, O extends ObservableInput<any>>(bufferSize: number | undefined, windowTime: number | undefined, selector: undefined, timestampProvider: TimestampProvider): OperatorFunction<T, ObservedValueOf<O>>;
|
56 | //# sourceMappingURL=publishReplay.d.ts.map |
\ | No newline at end of file |