Skip to content

Add missing class exports - #1164

Merged
sampajano merged 1 commit into
grpc:masterfrom
tinrab:export-missing-classes
Nov 10, 2021
Merged

Add missing class exports#1164
sampajano merged 1 commit into
grpc:masterfrom
tinrab:export-missing-classes

Conversation

@tinrab

@tinrab tinrab commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

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

Fixes #1158.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 8, 2021

Copy link
Copy Markdown

CLA Signed

The committers are authorized under a signed CLA.

@sampajano sampajano left a comment

Copy link
Copy Markdown
Collaborator

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 RpcError = goog.require('grpc.web.RpcError');
const StatusCode = goog.require('grpc.web.StatusCode');
const MethodDescriptor = goog.require('grpc.web.MethodDescriptor');
const MethodType = goog.require('grpc.web.MethodType');

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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