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

Type definition complains for some operators with union type #581

Closed
kwonoj opened this issue Oct 22, 2015 · 1 comment
Closed

Type definition complains for some operators with union type #581

kwonoj opened this issue Oct 22, 2015 · 1 comment

Comments

@kwonoj
Copy link
Member

kwonoj commented Oct 22, 2015

For example, signature of Observable.of is defined as below

Rx.Observable.of(value, [scheduler])

and declaration is like below, accepts value or scheduler with union type definition.

static of<T>(...array: (T | Scheduler)[]): Observable<T>

which makes eventually type inference confusions like
image

since array now contains value:T and scheduler:Scheduler both.

While this doesn't hurt functionality at all, would be better to have way to suppress these type of complains.

@kwonoj
Copy link
Member Author

kwonoj commented Oct 22, 2015

I will prepare PR resolves this issue partially as starting point.

kwonoj added a commit to kwonoj/rxjs that referenced this issue Oct 23, 2015
- allow multiple type parameters can be accepted for observable,
operator supports array of union types

closes ReactiveX#581
@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant