grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.51k stars 766 forks source link

Remove unused import #1233

Closed meling closed 2 years ago

meling commented 2 years ago

This checks which fields are actually used before adding the import alias. That is, some imports are only used by other languages, e.g., option imports such as protopatch for Go. Such imports are not used by Javascript or Typescript, and thus should not be imported. Currently, they result in errors like:

proto/ag/ag_pb.d.ts:4:30 - error TS2307: Cannot find module '../patch/go_pb' or its corresponding type declarations.

4 import * as patch_go_pb from '../patch/go_pb';

Fixes #529.

meling commented 2 years ago

Sorry. I'm a bit confused why the already merged commits from master shows up as part of this PR.

sampajano commented 2 years ago

Sorry. I'm a bit confused why the already merged commits from master shows up as part of this PR.

Thanks for the PR again! Maybe try just create a clean branch from master after syncing your personal repo with the upstream? 😃