Closed rhyshort closed 5 years ago
When attempting to use the default promise return type from @cloudant/cloudant, I get type errors when compiling, this is because of https://github.com/cloudant/nodejs-cloudant/blob/master/package.json#L26
@cloudant/cloudant
code example of compilation failure:
import * as cloudant from '@cloudant/cloudant'; export function test(): Promise<any> { //cloudant object creation and db.use omitted return database.bulk({docs: [{foo: "bar"}]}) }
Complies successfully.
error TS2739: Type 'Request' is missing the following properties from type 'Promise<any[]>': then, catch, [Symbol.toStringTag]
3.0.1
11.5.0
Bug Description
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
When attempting to use the default promise return type from
@cloudant/cloudant
, I get type errors when compiling, this is because of https://github.com/cloudant/nodejs-cloudant/blob/master/package.json#L26code example of compilation failure:
2. What you expected to happen
Complies successfully.
3. What actually happened
Environment details