-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area. related ReactiveX#6367 resolves ReactiveX#6399
b4b44d1
to
6a6798e
Compare
There was a problem hiding this 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.
@@ -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)` */ |
There was a problem hiding this comment.
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)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above...
Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area.
related #6367