How to make google.protobuf.Timestamp required?
I am using Typescript, Google Protobuf and library
"ts-proto": "^2.7.7", to generate ts types and use their encode/decode methods.
I have a message like
message DummyDraft {
google.protobuf.Timestamp created_at = 1;
}
the generated typescript type after running
protoc \
--plugin="./node_modules/.bin/protoc-gen-ts_proto" \
--ts_proto_out="$outputDir" \
--ts_proto_opt=esModuleInterop=true \
--ts_proto_opt=snakeToCamel=false \
--ts_proto_opt=typePrefix=Proto \
-I "./src/protos" \
./src/protos/*.proto
is
export interface ProtoDummyDraft {
created_at: Date | undefined;
}
Why can date be undefined ? I need created_at: Date only.
Is this possible with protobuff and how ?