-
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.
fix: forkJoin/combineLatest return Observable<unknown> if passed any (#…
…6227) * fix: forkJoin/combineLatest return Observable<unknown> if passed any Resolves #6226 * chore: make shenanigans readonly Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> * chore: Ensure there is no way the arg should work If the user passed that exact shape of object in AnyCatcher, technically it should work. This ensures there's no way it would work properly so `Observable<unknown>` is accurate. Also adds some documentation to the areas * refactor: Move any catcher signatures up Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
- Loading branch information
1 parent
6fa819b
commit ce0a2fa
Showing
7 changed files
with
57 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* This is just a type that we're using to identify `any` being passed to | ||
* function overloads. This is used because of situations like {@link forkJoin}, | ||
* where it could return an `Observable<T[]>` or an `Observable<{ [key: K]: T }>`, | ||
* so `forkJoin(any)` would mean we need to return `Observable<unknown>`. | ||
* | ||
* @internal | ||
*/ | ||
declare const anyCatcherSymbol: unique symbol; | ||
export type AnyCatcher = typeof anyCatcherSymbol; |
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