bufbuild/protobuf-es

Option for generate only types without static methods

Closed this issue · 1 comments

Might be useful for frontend declarations usage.

Current behavior with target=dts generates with static methods which is unnecessary.

@Satont, the static methods are necessary to parse and serialize messages. A frontend would typically use them to issue a HTTP request and process a response. The methods are available in the generated JavaScript code, so it makes sense to include them in the typings as well.

For frontend declaration usage, you can use import type, tree-shaking and code-splitting.

Closing, but please feel free to comment in case I misunderstood.