Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deprecate MapTo variants #6860

Merged
merged 2 commits into from
Mar 8, 2022

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Mar 4, 2022

Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area.

related #6367

@benlesh benlesh added 7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x labels Mar 4, 2022
@benlesh benlesh requested review from kwonoj and cartant March 4, 2022 16:00
Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area.

related ReactiveX#6367
resolves ReactiveX#6399
@benlesh benlesh force-pushed the deprecate-MapTo-variants branch from b4b44d1 to 6a6798e Compare March 4, 2022 16:02
@benlesh benlesh mentioned this pull request Mar 4, 2022
40 tasks
Copy link
Collaborator

@cartant cartant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the dtslint tests are failing:

ERROR: /home/runner/work/rxjs/rxjs/spec-dtslint/operators/mapTo-spec.ts:17:47 - No deprecation found
ERROR: /home/runner/work/rxjs/rxjs/spec-dtslint/operators/mergeMapTo-spec.ts:80:56 - No deprecation found

It looks like the mapTo signature that's being matched doesn't have a deprecation tag and mergeMapTo does not appear to have any deprecation tags.

@benlesh benlesh requested a review from cartant March 7, 2022 22:10
@benlesh benlesh merged commit 45a22e2 into ReactiveX:master Mar 8, 2022
@@ -2,7 +2,7 @@ import { switchMap } from './switchMap';
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { isFunction } from '../util/isFunction';

/* tslint:disable:max-line-length */
/** @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is mergeMap the recommended substitution for switchMapTo?

@@ -55,6 +54,7 @@ export function switchMapTo<T, R, O extends ObservableInput<unknown>>(
* `resultSelector`) every time a value is emitted on the source Observable,
* and taking only the values from the most recently projected inner
* Observable.
* @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above...

@benlesh benlesh deleted the deprecate-MapTo-variants branch March 24, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants