-
Notifications
You must be signed in to change notification settings - Fork 236
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: pubsubIssues related to the googleapis/nodejs-pubsub API.Issues related to the googleapis/nodejs-pubsub API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
If I understand the docs correctly, the following should work:
const PubSub = require('@google-cloud/pubsub');
const Promise = require('bluebird');
const pubsubClient = PubSub({
projectId: 'some-project-1234',
promise: Promise
});
pubsubClient.createTopic('test')
.tap(console.log);... but it throws with TypeError: pubsubClient.createTopic(...).tap is not a function, since the returned promise is a native one and not by bluebird.
Setting global.Promise to bluebird makes this example work, but that's besides the point.
I also tried setting it in the option object of the call to createTopic(), but that also fails.
Looking at common/utils, the promise option does not make it into the context of promisfy() there.
Environment details
- OS: macOs 10.13.2
- Node.js version: 9.2.1
- npm version: 5.6.0
- @google-cloud/pubsub version: 0.16.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: pubsubIssues related to the googleapis/nodejs-pubsub API.Issues related to the googleapis/nodejs-pubsub API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.