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

toPromise on Observable requires promise constructor argument #864

Closed
jeffbcross opened this issue Dec 2, 2015 · 5 comments · Fixed by #865
Closed

toPromise on Observable requires promise constructor argument #864

jeffbcross opened this issue Dec 2, 2015 · 5 comments · Fixed by #865
Labels
bug Confirmed bug

Comments

@jeffbcross
Copy link
Contributor

https://github.com/ReactiveX/RxJS/blob/master/src/Observable.ts#L247

The constructor should be optional, as it is implemented in the operator itself https://github.com/ReactiveX/RxJS/blob/master/src/operator/toPromise.ts

@jeffbcross jeffbcross added the bug Confirmed bug label Dec 2, 2015
@kwonoj
Copy link
Member

kwonoj commented Dec 2, 2015

Yes, seems so. I'll update this quickly.

@jeffbcross
Copy link
Contributor Author

Awesome @kwonoj thanks!

@johnpapa
Copy link

johnpapa commented Dec 2, 2015

thanks!

kwonoj added a commit to kwonoj/rxjs that referenced this issue Dec 2, 2015
- make Promistctor parameter as optional in type definition

closes ReactiveX#864
@robwormald
Copy link
Contributor

Nice one OJ. This sort of thing would be caught with TS running type checks on a TS based test suite, so I'm definitely for that.

@kwonoj
Copy link
Member

kwonoj commented Dec 2, 2015

This sort of thing would be caught with TS running type checks on a TS based test suite, so I'm definitely for that.

: totally agreed. Currently 2 proposals opened for this, #826 and #667. Once it's decided which way to go, test will be added along with updating existing type declarations if necessary.

kwonoj added a commit to kwonoj/rxjs that referenced this issue Dec 2, 2015
- make Promistctor parameter as optional in type definition

closes ReactiveX#864
@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
bug Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants