protoc-gen-grpc-gateway-ts
protoc-gen-grpc-gateway-ts copied to clipboard
Support for annotating deprecated fields
If a field is deprecated in the proto definitions, such as
message MyMessage {
string field_a = 1;
string field_b = 2 [deprecated = true];
}
Would it be possible to add a deprecated annotation to the generated types:
export type MyMessage = {
fieldA?: string
/**
* @deprecated
*/
fieldB?: string[]
}
If it did, the typescript compiler picks this up giving a warning:
This is useful when deprecating an old field (and often moving to a new one) in a large codebase as it gives a visual indication where the old one is used.