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

Improve type inferrance for bindCallback #3478

Closed
benlesh opened this issue Mar 27, 2018 · 3 comments
Closed

Improve type inferrance for bindCallback #3478

benlesh opened this issue Mar 27, 2018 · 3 comments
Assignees

Comments

@benlesh
Copy link
Member

benlesh commented Mar 27, 2018

bindCallback has never really had great type safety. Ideally we'd be able to infer the types from the callbacks. Something like this seems like it should work in TS 2.7:

bindCallback(fn: (a: A, b: B, callback: (err: any, c: C, d: D) => void)): (a: A, b: B) => Observable<[C, D]>
@benlesh benlesh changed the title Improve type inferrance for bindCallback1 Improve type inferrance for bindCallback Mar 27, 2018
@benlesh benlesh self-assigned this Mar 27, 2018
@benlesh
Copy link
Member Author

benlesh commented Mar 28, 2018

We have a PR for this here #3480... but TypeScript doesn't appear to handle solid type inference, so it's blocked by this issue: microsoft/TypeScript#22952

@benlesh
Copy link
Member Author

benlesh commented Apr 2, 2018

#3480 closed this.

@benlesh benlesh closed this as completed Apr 2, 2018
@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 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

No branches or pull requests

1 participant