This is a collection of ideas for further development:
-
Generate clients for @grpc/grpc-js (see #57)
-
Provide a “backend” for grpc-web, similar to the grpc-backend
-
Support Enum / Enum value options (see #37)
-
~Convenience functions to read service and message options (see #36)~
-
~Support message options (see #35)~
-
support validate.proto
- see https://github.com/envoyproxy/protoc-gen-validate (already has a test harness)
function validate<T>(message: T, IMessageType<T> type): string | undefined
- make available in @protobuf-ts/runtime or @protobuf-ts/validate
-
run test-generated specs in web browser too
-
benchmark code-size for grpc-web and twirp
-
globalThis on nodejs < 12.0.0: use polyfill or show better error message
https://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-package-json -
rename
oneof
discriminator from “oneofKind” to “oneof” -
grpc web interop-tests:
- https://github.com/grpc/grpc-web/tree/master/test/interop (docker; slow setup; difficult testing)
- https://github.com/grpc/grpc-web/blob/master/doc/interop-test-descriptions.md
- https://github.com/grpc/grpc-web/blob/master/docker-compose.yml
- https://github.com/grpc/grpc-web/tree/master/net/grpc/gateway/docker
-
field mask utils
- FieldMask.normalize(mask: FieldMask): FieldMask Converts a FieldMask to its canonical form. In the canonical form of a FieldMask, all field paths are sorted alphabetically and redundant field paths are removed.
- FieldMask.union(firstMask: FieldMask, … otherMasks: FieldMask[]): FieldMask Creates a union of two or more FieldMasks.
- FieldMask.intersection(s: FieldMask, b: FieldMask): FieldMask Calculates the intersection of two FieldMasks.
-
generate IMessageType<T>.equals(a: T, b: T);
-
generate json I/O methods
-
IMessageType<T>.extract(message: T, mask: FieldMask): PartialMessage<T>; Returns a partial message that has only the fields specified in the mask.
-
IMessageType<T>.diff(a: T, b: T): FieldMask; Creates a field mask with all fields that are different between a and b.
-
IMessageType<T>.mergeMessage(target: T, source: T, mask: FieldMask): T; convenience for doing extract() and mergePartial()
-
generate “typeName” discriminator property in interfaces? a symbol?
-
prevent local field name clashes, see book.proto TestPrimitiveFieldsWithSameJsonName
-
proto compiler in typescript
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (7 by maintainers)
Top GitHub Comments
Possibly provide a new package for parsing the currently unspecified text protobuf format.
For what’s it’s worth, https://developers.google.com/protocol-buffers/docs/reference/proto3-spec isn’t accurate, not even close actually heh.