diff --git a/docs_app/content/deprecations/scheduler-argument.md b/docs_app/content/deprecations/scheduler-argument.md new file mode 100644 index 0000000000..b382a0c5f6 --- /dev/null +++ b/docs_app/content/deprecations/scheduler-argument.md @@ -0,0 +1,101 @@ +# Scheduler Argument + +To limit the API surface of some operators, but also prepare for a [major refactoring in V8](https://github.com/ReactiveX/rxjs/pull/4583), we +agreed on deprecating the `scheduler` argument from many operators. It solely deprecates those methods where this argument is rarely used. So `time` related +operators, like [`interval`](https://rxjs.dev/api/index/function/interval) are not affected by this deprecation. + +To support this transition the [scheduled creation function](/api/index/function/scheduled) was added. + +
+ + This deprecation was introduced in **RxJS 6.5** and will become breaking with **RxJS 8**. + +
+ +## Operators affected by this Change + +- [from](/api/index/function/from) +- [of](/api/index/function/of) +- [merge](/api/index/function/merge) +- [concat](/api/index/function/concat) +- [startWith](/api/operators/startWith) +- [endWith](/api/operators/endWith) +- [combineLatest](/api/index/function/combineLatest) + +## How to Refactor + +If you use any other operator from the list above and using the `scheduler` argument, you have to three potential refactoring options. + +### Refactoring of `of` and `from` + +`scheduled` is kinda copying the behavior of `from`. Therefore if you used `from` with a `scheduler` argument, you can just replace them. + +For the `of` creation function you need to this Observable with `scheduled` and instead of passing the `scheduler` argument to `of` pass it to `scheduled`. +Following code example demonstrate this process. + +```ts +import { of, asyncScheduler, scheduled } from 'rxjs'; + +// Deprecated approach +of([1,2,3], asyncScheduler).subscribe(x => console.log(x)); +// suggested approach +scheduled([1,2,3], asyncScheduler).subscribe(x => console.log(x)); +``` + +### Refactoring of `merge`, `concat`, `combineLatest`, `startWith` and `endWith` + +In case you used to pass a scheduler argument to one of these operators you probably had code like this: + +```ts +import { concat, of, asyncScheduler } from 'rxjs'; + +concat( + of('hello '), + of('World'), + asyncScheduler +).subscribe(x => console.log(x)); +``` + +To work around this deprecation you can leverage the [`scheduled`](/api/index/function/scheduled) function. + +```ts +import { scheduled, of, asyncScheduler } from 'rxjs'; +import { concatAll } from 'rxjs/operators' + +scheduled( + [of('hello '), of('World')], + asyncScheduler +).pipe( + concatAll() +).subscribe(x => console.log(x)); +``` + +You can apply this pattern to refactor deprecated usage of `concat`, `startWith` and `endWith` but do notice that you will want to use [mergeAll](/api/operators/mergeAll) to refactor the deprecated usage of `merge`. + +With `combineLatest`, you will want to use [combineAll](/api/operators/combineAll) + +E.g. code that used to look like this: + +```ts +import { combineLatest, of, asyncScheduler } from 'rxjs'; + +combineLatest( + of('hello '), + of('World'), + asyncScheduler +).subscribe(console.log) +``` + +would become: + +```ts +import { scheduled, of, asyncScheduler } from 'rxjs'; +import { combineAll } from 'rxjs/operators' + +scheduled( + [of('hello '), of('World')], + asyncScheduler +).pipe( + combineAll() +).subscribe(x => console.log(x)); +``` diff --git a/docs_app/content/guide/higher-order-observables.md b/docs_app/content/guide/higher-order-observables.md new file mode 100644 index 0000000000..9d6c053d8f --- /dev/null +++ b/docs_app/content/guide/higher-order-observables.md @@ -0,0 +1,28 @@ +# Higher-order Observables + +Observables most commonly emit ordinary values like strings and numbers, but surprisingly often, it is necessary to handle Observables *of* Observables, so-called higher-order Observables. For example, imagine you have an Observable emitting strings that are the URLs of files you want to fetch. The code might look like this: + +```ts +const fileObservable = urlObservable.pipe( + map(url => http.get(url)), +); +``` + +`http.get()` returns an Observable for each URL. Now you have an Observable *of* Observables, a higher-order Observable. + +But how do you work with a higher-order Observable? Typically, by _flattening_: by converting a higher-order Observable into an ordinary Observable. For example: + +```ts +const fileObservable = urlObservable.pipe( + concatMap(url => http.get(url)), +); +``` + +The Observable returned in the `concatMap` function is usually referred to as a so-called "inner" Observable, while in this context the `urlObservable` is the so-called "outer" Observable. + +The [`concatMap()`](/api/operators/concatMap) operator subscribes to each "inner" Observable, buffers all further emissions of the "outer" Observable, and copies all the emitted values until the inner Observable completes, and continues processing the values of the "outer Observable". All of the values are in that way concatenated. Other useful flattening operators are + +* [`mergeMap()`](/api/operators/mergeMap) — subscribes to each inner Observable as it arrives, then emits each value as it arrives +* [`switchMap()`](/api/operators/switchMap) — subscribes to the first inner Observable when it arrives, and emits each value as it arrives, but when the next inner Observable arrives, unsubscribes to the previous one, and subscribes to the new one. +* [`exhaustMap()`](/api/operators/exhaustMap) — subscribes to the first inner Observable when it arrives, and emits each value as it arrives, discarding all newly arriving inner Observables until that first one completes, then waits for the next inner Observable. + diff --git a/docs_app/content/navigation.json b/docs_app/content/navigation.json index 5b9583fc4e..b3305231f7 100644 --- a/docs_app/content/navigation.json +++ b/docs_app/content/navigation.json @@ -84,12 +84,17 @@ { "url": "guide/v6/pipeable-operators", "title": "Pipeable Operators" - }, + } + ] + }, + { + "title": "Deprecations & Breaking Changes", + "children": [ { - "url": "api/deprecations", - "title": "Deprecations", - "tooltip": "List of Deprecations" + "url": "deprecations/scheduler-argument", + "title": "Scheduler Argument" } + ] }, { diff --git a/docs_app/tools/transforms/angular-content-package/index.js b/docs_app/tools/transforms/angular-content-package/index.js index 0c5068efaa..f623f7fb22 100644 --- a/docs_app/tools/transforms/angular-content-package/index.js +++ b/docs_app/tools/transforms/angular-content-package/index.js @@ -19,7 +19,7 @@ module.exports = new Package('angular-content', [basePackage, contentPackage]) readFilesProcessor.sourceFiles = readFilesProcessor.sourceFiles.concat([ { basePath: CONTENTS_PATH, - include: CONTENTS_PATH + '/{cookbook,guide,tutorial}/**/*.md', + include: CONTENTS_PATH + '/{deprecations,guide,tutorial}/**/*.md', fileReader: 'contentFileReader' }, { diff --git a/src/internal/observable/combineLatest.ts b/src/internal/observable/combineLatest.ts index 2ac5abc195..686acb8844 100644 --- a/src/internal/observable/combineLatest.ts +++ b/src/internal/observable/combineLatest.ts @@ -177,19 +177,19 @@ export function combineLatest< ): Observable; // With a scheduler (deprecated) -/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */ +/** @deprecated The scheduler argument is deprecated, use scheduled and combineAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function combineLatest>(sources: [O1], scheduler: SchedulerLike): Observable<[ObservedValueOf]>; -/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */ +/** @deprecated The scheduler argument is deprecated, use scheduled and combineAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function combineLatest, O2 extends ObservableInput>( sources: [O1, O2], scheduler: SchedulerLike ): Observable<[ObservedValueOf, ObservedValueOf]>; -/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */ +/** @deprecated The scheduler argument is deprecated, use scheduled and combineAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function combineLatest, O2 extends ObservableInput, O3 extends ObservableInput>( sources: [O1, O2, O3], scheduler: SchedulerLike ): Observable<[ObservedValueOf, ObservedValueOf, ObservedValueOf]>; -/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */ +/** @deprecated The scheduler argument is deprecated, use scheduled and combineAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function combineLatest< O1 extends ObservableInput, O2 extends ObservableInput, @@ -199,7 +199,7 @@ export function combineLatest< sources: [O1, O2, O3, O4], scheduler: SchedulerLike ): Observable<[ObservedValueOf, ObservedValueOf, ObservedValueOf, ObservedValueOf]>; -/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */ +/** @deprecated The scheduler argument is deprecated, use scheduled and combineAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function combineLatest< O1 extends ObservableInput, O2 extends ObservableInput, @@ -210,7 +210,7 @@ export function combineLatest< sources: [O1, O2, O3, O4, O5], scheduler: SchedulerLike ): Observable<[ObservedValueOf, ObservedValueOf, ObservedValueOf, ObservedValueOf, ObservedValueOf]>; -/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */ +/** @deprecated The scheduler argument is deprecated, use scheduled and combineAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function combineLatest< O1 extends ObservableInput, O2 extends ObservableInput, @@ -224,7 +224,7 @@ export function combineLatest< ): Observable< [ObservedValueOf, ObservedValueOf, ObservedValueOf, ObservedValueOf, ObservedValueOf, ObservedValueOf] >; -/** @deprecated Passing a scheduler here is deprecated, use {@link subscribeOn} and/or {@link observeOn} instead */ +/** @deprecated The scheduler argument is deprecated, use scheduled and combineAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function combineLatest>(sources: O[], scheduler: SchedulerLike): Observable[]>; // Best case diff --git a/src/internal/observable/concat.ts b/src/internal/observable/concat.ts index fe23ee7502..e15b6c99f4 100644 --- a/src/internal/observable/concat.ts +++ b/src/internal/observable/concat.ts @@ -5,17 +5,17 @@ import { isScheduler } from '../util/isScheduler'; import { fromArray } from './fromArray'; /* tslint:disable:max-line-length */ -/** @deprecated remove in v8. Passing a scheduler to concat is deprecated, please use {@link scheduled} and {@link concatAll} `scheduled([o1, o2], scheduler).pipe(concatAll())` */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function concat>(v1: O1, scheduler: SchedulerLike): Observable>; -/** @deprecated remove in v8. Passing a scheduler to concat is deprecated, please use {@link scheduled} and {@link concatAll} `scheduled([o1, o2], scheduler).pipe(concatAll())` */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function concat, O2 extends ObservableInput>(v1: O1, v2: O2, scheduler: SchedulerLike): Observable | ObservedValueOf>; -/** @deprecated remove in v8. Passing a scheduler to concat is deprecated, please use {@link scheduled} and {@link concatAll} `scheduled([o1, o2], scheduler).pipe(concatAll())` */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function concat, O2 extends ObservableInput, O3 extends ObservableInput>(v1: O1, v2: O2, v3: O3, scheduler: SchedulerLike): Observable | ObservedValueOf | ObservedValueOf>; -/** @deprecated remove in v8. Passing a scheduler to concat is deprecated, please use {@link scheduled} and {@link concatAll} `scheduled([o1, o2], scheduler).pipe(concatAll())` */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function concat, O2 extends ObservableInput, O3 extends ObservableInput, O4 extends ObservableInput>(v1: O1, v2: O2, v3: O3, v4: O4, scheduler: SchedulerLike): Observable | ObservedValueOf | ObservedValueOf | ObservedValueOf>; -/** @deprecated remove in v8. Passing a scheduler to concat is deprecated, please use {@link scheduled} and {@link concatAll} `scheduled([o1, o2], scheduler).pipe(concatAll())` */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function concat, O2 extends ObservableInput, O3 extends ObservableInput, O4 extends ObservableInput, O5 extends ObservableInput>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, scheduler: SchedulerLike): Observable | ObservedValueOf | ObservedValueOf | ObservedValueOf | ObservedValueOf>; -/** @deprecated remove in v8. Passing a scheduler to concat is deprecated, please use {@link scheduled} and {@link concatAll} `scheduled([o1, o2], scheduler).pipe(concatAll())` */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function concat, O2 extends ObservableInput, O3 extends ObservableInput, O4 extends ObservableInput, O5 extends ObservableInput, O6 extends ObservableInput>(v1: O1, v2: O2, v3: O3, v4: O4, v5: O5, v6: O6, scheduler: SchedulerLike): Observable | ObservedValueOf | ObservedValueOf | ObservedValueOf | ObservedValueOf | ObservedValueOf>; export function concat[]>(...observables: A): Observable>; diff --git a/src/internal/observable/from.ts b/src/internal/observable/from.ts index c7a77b756d..9795d438b6 100644 --- a/src/internal/observable/from.ts +++ b/src/internal/observable/from.ts @@ -16,7 +16,7 @@ import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types'; import { scheduled } from '../scheduled/scheduled'; export function from>(input: O): Observable>; -/** @deprecated use {@link scheduled} instead. */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function from>(input: O, scheduler: SchedulerLike): Observable>; /** @@ -149,4 +149,4 @@ function subscribeTo(result: ObservableInput): (subscriber: Subscriber) + ' You can provide an Observable, Promise, Array, AsyncIterable, or Iterable.'; throw new TypeError(msg); } -}; \ No newline at end of file +} diff --git a/src/internal/observable/merge.ts b/src/internal/observable/merge.ts index 04df785475..5b6be7484c 100644 --- a/src/internal/observable/merge.ts +++ b/src/internal/observable/merge.ts @@ -9,27 +9,27 @@ import { from } from './from'; import { EMPTY } from './empty'; /* tslint:disable:max-line-length */ -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge(v1: ObservableInput, scheduler: SchedulerLike): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge(v1: ObservableInput, concurrent: number, scheduler: SchedulerLike): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge(v1: ObservableInput, v2: ObservableInput, scheduler: SchedulerLike): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, concurrent: number, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, @@ -37,7 +37,7 @@ export function merge( concurrent: number, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, @@ -45,7 +45,7 @@ export function merge( v4: ObservableInput, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, @@ -54,7 +54,7 @@ export function merge( concurrent: number, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, @@ -63,7 +63,7 @@ export function merge( v5: ObservableInput, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, @@ -73,7 +73,7 @@ export function merge( concurrent: number, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, @@ -83,7 +83,7 @@ export function merge( v6: ObservableInput, scheduler: SchedulerLike ): Observable; -/** @deprecated use {@link scheduled} and {@link mergeAll} (e.g. `scheduled([ob1, ob2, ob3], scheduler).pipe(mergeAll())*/ +/** @deprecated The scheduler argument is deprecated, use scheduled and mergeAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function merge( v1: ObservableInput, v2: ObservableInput, diff --git a/src/internal/observable/of.ts b/src/internal/observable/of.ts index 507aca0305..115b3cb085 100644 --- a/src/internal/observable/of.ts +++ b/src/internal/observable/of.ts @@ -5,27 +5,27 @@ import { Observable } from '../Observable'; import { scheduleArray } from '../scheduled/scheduleArray'; /* tslint:disable:max-line-length */ -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, c: T3, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, c: T3, d: T4, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, c: T3, d: T4, e: T5, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, c: T3, d: T4, e: T5, f: T6, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, c: T3, d: T4, e: T5, f: T6, g: T7, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, c: T3, d: T4, e: T5, f: T6, g: T7, h: T8, scheduler: SchedulerLike): Observable; -/** @deprecated remove in v8. Use {@link scheduled} instead `scheduled([a, b, c], scheduler)` */ +/** @deprecated The scheduler argument is deprecated, use scheduled. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function of(a: T, b: T2, c: T3, d: T4, e: T5, f: T6, g: T7, h: T8, i: T9, scheduler: SchedulerLike): Observable; diff --git a/src/internal/operators/endWith.ts b/src/internal/operators/endWith.ts index 0b6b283e64..974fff5144 100644 --- a/src/internal/operators/endWith.ts +++ b/src/internal/operators/endWith.ts @@ -4,19 +4,19 @@ import { of } from '../observable/of'; import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ValueFromArray } from '../types'; /* tslint:disable:max-line-length */ -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function endWith(scheduler: SchedulerLike): MonoTypeOperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function endWith(v1: A, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function endWith(v1: A, v2: B, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function endWith(v1: A, v2: B, v3: C, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function endWith(v1: A, v2: B, v3: C, v4: D, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function endWith(v1: A, v2: B, v3: C, v4: D, v5: E, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([source, [a, b, c]], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function endWith(v1: A, v2: B, v3: C, v4: D, v5: E, v6: F, scheduler: SchedulerLike): OperatorFunction; export function endWith(...args: A): OperatorFunction>; diff --git a/src/internal/operators/startWith.ts b/src/internal/operators/startWith.ts index 3c08067011..24b448e4ff 100644 --- a/src/internal/operators/startWith.ts +++ b/src/internal/operators/startWith.ts @@ -4,19 +4,19 @@ import { isScheduler } from '../util/isScheduler'; import { MonoTypeOperatorFunction, OperatorFunction, SchedulerLike, ValueFromArray } from '../types'; /* tslint:disable:max-line-length */ -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function startWith(scheduler: SchedulerLike): MonoTypeOperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function startWith(v1: D, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function startWith(v1: D, v2: E, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function startWith(v1: D, v2: E, v3: F, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function startWith(v1: D, v2: E, v3: F, v4: G, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function startWith(v1: D, v2: E, v3: F, v4: G, v5: H, scheduler: SchedulerLike): OperatorFunction; -/** @deprecated use {@link scheduled} and {@link concatAll} (e.g. `scheduled([[a, b, c], source], scheduler).pipe(concatAll())`) */ +/** @deprecated The scheduler argument is deprecated, use scheduled and concatAll. Details: https://rxjs.dev/deprecations/scheduler-argument */ export function startWith(v1: D, v2: E, v3: F, v4: G, v5: H, v6: I, scheduler: SchedulerLike): OperatorFunction; export function startWith(...values: A): OperatorFunction>;