Skip to content
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

Export types for publish/subscriber options #1227

Closed
ettancos opened this issue Mar 12, 2021 · 0 comments · Fixed by #1371
Closed

Export types for publish/subscriber options #1227

ettancos opened this issue Mar 12, 2021 · 0 comments · Fixed by #1371
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@ettancos
Copy link

ettancos commented Mar 12, 2021

Hi

It would be great if the types for SubscriberOptions and PublishOptions would be exported. Most of the other option types are exported properly, these seem to have been missed. Is there any particular reason they shouldn't be exported?

If its not intentional, this seems to be rather straightforward. I do not know if or when I'll be able to get a CLA request through so I didn't open a PR yet.

diff --git c/src/index.ts w/src/index.ts
index 8320ea3..15389ac 100644
--- c/src/index.ts
+++ w/src/index.ts
@@ -90,7 +90,8 @@ export {
   TestIamPermissionsCallback,
   IAM,
 } from './iam';
-export {Attributes, PublishCallback} from './publisher';
+export {Attributes, PublishCallback, PublishOptions} from './publisher';
+export {BatchPublishOptions} from './publisher/message-batch';
 export {PublishError} from './publisher/publish-error';
 export {
   PageOptions,
@@ -114,7 +115,7 @@ export {
   SeekResponse,
   Snapshot,
 } from './snapshot';
-export {Message} from './subscriber';
+export {Message, SubscriberOptions} from './subscriber';
 export {
   PushConfig,
   SubscriptionMetadata,

update: added BatchPublishOptions as it is needed because its part of PublishOptions

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Mar 12, 2021
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Mar 13, 2021
@feywind feywind added priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Mar 18, 2021
gcf-merge-on-green bot pushed a commit that referenced this issue Aug 18, 2021
Fixes #1227

Some of the options objects that are passed down deep don't have all of the types exposed, so users of TypeScript can't set them gracefully.
gcf-owl-bot bot added a commit that referenced this issue Sep 29, 2021
Source-Link: googleapis/synthtool@d4236bb
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:c0ad7c54b9210f1d10678955bc37b377e538e15cb07ecc3bac93cc7219ec2bc5
bcoe pushed a commit that referenced this issue Oct 5, 2021
Source-Link: googleapis/synthtool@d4236bb
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:c0ad7c54b9210f1d10678955bc37b377e538e15cb07ecc3bac93cc7219ec2bc5

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
feywind pushed a commit to feywind/nodejs-pubsub that referenced this issue Nov 12, 2024
…gleapis#945)

Source-Link: googleapis/synthtool@d4236bb
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:c0ad7c54b9210f1d10678955bc37b377e538e15cb07ecc3bac93cc7219ec2bc5
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants