Skip to content
This repository was archived by the owner on Jul 30, 2018. It is now read-only.

Change Promise interface to infer void #156

Closed
kitsonk opened this issue May 10, 2016 · 2 comments
Closed

Change Promise interface to infer void #156

kitsonk opened this issue May 10, 2016 · 2 comments
Milestone

Comments

@kitsonk
Copy link
Member

kitsonk commented May 10, 2016

We should be able to type Promise so if resolve() is used, it infers void instead of {}.

@kitsonk kitsonk added this to the 2016.05 milestone May 10, 2016
@kitsonk
Copy link
Member Author

kitsonk commented May 11, 2016

I am actually not sure how we can accomplish this. :-S

Opened microsoft/TypeScript#8554 to find out if there is a way without asserting <void>.

@kitsonk
Copy link
Member Author

kitsonk commented May 23, 2016

No, there is no currently easy way of contextually inferring Promise type from the executor.

@kitsonk kitsonk closed this as completed May 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant