Skip to content

chore: deprecate MapTo variants#6860

Merged
benlesh merged 2 commits intoReactiveX:masterfrom
benlesh:deprecate-MapTo-variants
Mar 8, 2022
Merged

chore: deprecate MapTo variants#6860
benlesh merged 2 commits intoReactiveX:masterfrom
benlesh:deprecate-MapTo-variants

Conversation

@benlesh
Copy link
Copy Markdown
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 cartant and kwonoj 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
Copy Markdown
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
import { isFunction } from '../util/isFunction';

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

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?

* `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)`
Copy link
Copy Markdown

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