Skip to content

Change TS return types from PromiseLike to Promise #58

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

james-rabbit
Copy link

start() and promise() return a real Promise, which has then and catch.

According to the TS docs, PromiseLike only has then but not catch, so it's helpful to give the extra information here about the return type, so people know they can use catch on the result as well.

`start()` and `promise()` return a real Promise, which has `then` and `catch`.
According to the TS docs (link below), `PromiseLike` only has `then` but not `catch`, so it's helpful to give the extra information here about the return type, so people know they can use `catch` on the result as well.

https://github.com/Microsoft/TypeScript/blob/696b0f8d43524f743048a6c5d5944939e8b43b99/lib/lib.es5.d.ts#L1291-L1319
@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants