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

proto-loader-gen-types Narrow field Long check #2370

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

install
Copy link
Contributor

@install install commented Feb 22, 2023

  • Explicitly list the primitive field types that use Long, instead of searching for 64 in the type name.

Currently the check for when to import Long just looks to see if any field type has 64 in the name.
This potentially leads to adding unused imports that causes a typescript error, when using something like google.protobuf.Int64Value

src/__generated__/Example.ts:6:1 - error TS6133: 'Long' is declared but its value is never read.

6 import type { Long } from '@grpc/proto-loader';

- Explicitly list the primitive field types that use Long, instead of
  searching for `64` in the type name.
Copy link
Member

@murgatroid99 murgatroid99 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.

@murgatroid99 murgatroid99 merged commit 1054432 into grpc:master Feb 24, 2023
@install install deleted the explicit-field-type-long-check branch February 27, 2023 15:50
@install
Copy link
Contributor Author

install commented Mar 7, 2023

@murgatroid99 any chance you can help cut a release for this?

@murgatroid99
Copy link
Member

Sorry for the delay. This is out now in version 0.7.6.

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

Successfully merging this pull request may close these issues.

None yet

3 participants