Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix TypeScript type for the cancel method #28

Merged
merged 1 commit into from
May 2, 2021

Conversation

rkesters
Copy link
Contributor

@rkesters rkesters commented Apr 30, 2021

When a project uses @types/bluebird-global there is a type clash, this PR makes a simple change to the typings file to allow p-cancelable to co-exist with @types/bluebird-global.

correct the following tsc error:

node_modules/p-cancelable/index.d.ts:166:2 - error TS2425: Class 'Promise<ValueType>' defines instance member property 'cancel', but extended class 'PCancelable<ValueType>' defines it as instance member function.

@rkesters rkesters marked this pull request as ready for review April 30, 2021 16:13
@rkesters
Copy link
Contributor Author

@sindresorhus I hope that you will accept this PR and publish a new version of this repo and of got.

@sindresorhus
Copy link
Owner

Don't do unrelated changes.

@rkesters
Copy link
Contributor Author

@sindresorhus -- I removed the .gitignore modification

@sindresorhus sindresorhus changed the title Changed the typing for the cancel function to be compatible with bluebird Fix TypeScript type for the cancel method May 2, 2021
@sindresorhus sindresorhus merged commit c80c3ee into sindresorhus:main May 2, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants