Skip to content

Commit cfd2c16

Browse files
authored
Docs: multicast deprecation (#6403)
* docs(multicast): mark primary signature as deprecated * docs(publish): mark primary signature as deprecated * docs(publishReplay): mark primary signature as deprecated
1 parent 88fdfe9 commit cfd2c16

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/internal/operators/multicast.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ export function multicast<T, O extends ObservableInput<any>>(
7373
selector: (shared: Observable<T>) => O
7474
): OperatorFunction<T, ObservedValueOf<O>>;
7575

76+
/**
77+
* @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the
78+
* {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's
79+
* behaviors.
80+
* Details: https://rxjs.dev/deprecations/multicasting
81+
*/
7682
export function multicast<T, R>(
7783
subjectOrSubjectFactory: Subject<T> | (() => Subject<T>),
7884
selector?: (source: Observable<T>) => Observable<R>

src/internal/operators/publish.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ export function publish<T, O extends ObservableInput<any>>(selector: (shared: Ob
7979
* Subscribers to the given source will receive all notifications of the source from the time of the subscription on.
8080
* @return A function that returns a ConnectableObservable that upon connection
8181
* causes the source Observable to emit items to its Observers.
82+
* @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the
83+
* {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's
84+
* behaviors.
85+
* Details: https://rxjs.dev/deprecations/multicasting
8286
*/
8387
export function publish<T, R>(selector?: OperatorFunction<T, R>): MonoTypeOperatorFunction<T> | OperatorFunction<T, R> {
8488
return selector ? connect(selector) : multicast(new Subject<T>());

src/internal/operators/publishReplay.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export function publishReplay<T, O extends ObservableInput<any>>(
7474
timestampProvider: TimestampProvider
7575
): OperatorFunction<T, ObservedValueOf<O>>;
7676

77+
/**
78+
* @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the
79+
* {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's
80+
* behaviors.
81+
* Details: https://rxjs.dev/deprecations/multicasting
82+
*/
7783
export function publishReplay<T, R>(
7884
bufferSize?: number,
7985
windowTime?: number,

0 commit comments

Comments
 (0)