-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: deprecate MapTo variants (#6860)
* chore: deprecate MapTo variants Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area. related #6367 resolves #6399 * chore: fix up deprecation messages
- Loading branch information
Showing
8 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)` */ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jakovljevic-mladen
Member
|
||
export function switchMapTo<O extends ObservableInput<unknown>>(observable: O): OperatorFunction<unknown, ObservedValueOf<O>>; | ||
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ | ||
export function switchMapTo<O extends ObservableInput<unknown>>( | ||
|
@@ -14,7 +14,6 @@ export function switchMapTo<T, R, O extends ObservableInput<unknown>>( | |
observable: O, | ||
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R | ||
): OperatorFunction<T, R>; | ||
/* tslint:enable:max-line-length */ | ||
|
||
/** | ||
* Projects each source value to the same Observable which is flattened multiple | ||
|
@@ -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)` | ||
*/ | ||
export function switchMapTo<T, R, O extends ObservableInput<unknown>>( | ||
innerObservable: O, | ||
|
Shouldn't the recommended substitution be
switchMap
?