-
Notifications
You must be signed in to change notification settings - Fork 679
Closed
Labels
area:typescriptissues that specifically impact using the package from typescript projectsissues that specifically impact using the package from typescript projects
Description
Description
If a typescript project is using @types/bluebird@2.0.33, it cannot use @slack/client.
What type of issue is this? (place an x in one of the [ ])
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x in each of the [ ])
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
@slack/client version: 4.3.1
node version: 8.9.1
OS version(s):
Steps to reproduce:
$ mkdir demo && cd demo
$ npm install typescript@3.0.1 @types/bluebird@2.0.33 @slack/client@4.3.1
$ touch index.ts
$ tsc --lib es2017 index.ts
node_modules/@types/p-cancelable/index.d.ts:10:11 - error TS2430: Interface 'PCancelableConstructor' incorrectly extends interface 'PromiseConstructor'.
Types of property 'prototype' are incompatible.
Type 'PCancelable<any>' is not assignable to type 'Promise<any>'.
Types of property 'cancel' are incompatible.
Type '() => void' is not assignable to type '<U>(reason?: any) => Promise<U>'.
Type 'void' is not assignable to type 'Promise<U>'.
10 interface PCancelableConstructor extends PromiseConstructor {
~~~~~~~~~~~~~~~~~~~~~~
node_modules/@types/p-cancelable/index.d.ts:18:15 - error TS2430: Interface 'PCancelable<T>' incorrectly extends interface 'Promise<T>'.
Types of property 'cancel' are incompatible.
Type '() => void' is not assignable to type '<U>(reason?: any) => Promise<U>'.
Type 'void' is not assignable to type 'Promise<U>'.
18 interface PCancelable<T> extends Promise<T> {
~~~~~~~~~~~Expected result:
compiles
Actual result:
doesn't compile
Metadata
Metadata
Assignees
Labels
area:typescriptissues that specifically impact using the package from typescript projectsissues that specifically impact using the package from typescript projects