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

Add missing class exports #1164

Merged
merged 1 commit into from
Nov 10, 2021
Merged

Add missing class exports #1164

merged 1 commit into from
Nov 10, 2021

Conversation

tinrab
Copy link
Contributor

@tinrab tinrab commented Nov 8, 2021

Added exports for classes with constructors so that they can be used with Typescript.

Fixes #1158.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 8, 2021

CLA Signed

The committers are authorized under a signed CLA.

Copy link
Collaborator

@sampajano sampajano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the change! 😃 (I'll wait for another important bug fix and create a bug fix release soon 😃)

Also adding @stanley-cheung to take a look too 😃

const StatusCode = goog.require('grpc.web.StatusCode');
const MethodDescriptor = goog.require('grpc.web.MethodDescriptor');
const MethodType = goog.require('grpc.web.MethodType');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do you mind help sort this line as well? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order reflects exports from index.d.ts? Is this ok?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks for the considerations :)

Personally i still prefer the exports to be alphabetically ordered in this file, given the connection to index.d.ts is an obscure one and would be harder to maintain (especially if we don't even document it here).

But i'm fine if you want to leave this as is in this PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing RpcError in exports.js (among other classes), inconsistent with index.d.ts
4 participants