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

Typing of the race operator #4390

Closed
timdeschryver opened this issue Nov 28, 2018 · 0 comments · Fixed by #4643
Closed

Typing of the race operator #4390

timdeschryver opened this issue Nov 28, 2018 · 0 comments · Fixed by #4643
Labels
TS Issues and PRs related purely to TypeScript issues

Comments

@timdeschryver
Copy link
Contributor

Bug Report

Current Behavior
Currently, the typing is the following:

const o = of('a', 'b', 'c').pipe(race(of('x', 'y', 'z'), [of('t', 'i', 'm')])); // $ExpectType Observable<string>

Expected behavior

While it should be:

const o = of('a', 'b', 'c').pipe(race(of('x', 'y', 'z'), [of('t', 'i', 'm')])); // $ExpectType Observable<string|Observable<string>>

Environment

  • RxJS version: 6.3.3

Additional context/Screenshots

See #4344 (comment)

@cartant cartant added the TS Issues and PRs related purely to TypeScript issues label Jan 27, 2019
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 15, 2019
- Actually accept other `ObservableInput` types (Promises, etc)
- Fixes issue where TypeScript would complain when you tried to subscribe to a race between to Observable types.

Fixes ReactiveX#4390
Fixes ReactiveX#4642
benlesh added a commit that referenced this issue Mar 15, 2019
- Actually accept other `ObservableInput` types (Promises, etc)
- Fixes issue where TypeScript would complain when you tried to subscribe to a race between to Observable types.

Fixes #4390
Fixes #4642
@lock lock bot locked as resolved and limited conversation to collaborators Apr 14, 2019
BioPhoton pushed a commit to BioPhoton/rxjs that referenced this issue May 15, 2019
- Actually accept other `ObservableInput` types (Promises, etc)
- Fixes issue where TypeScript would complain when you tried to subscribe to a race between to Observable types.

Fixes ReactiveX#4390
Fixes ReactiveX#4642
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
TS Issues and PRs related purely to TypeScript issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants