Converts an input value to a binary data of Protocol Buffer format.
For reference, this typia.protobuf.encode() does not validate the input value.
It just believes that the input value is valid and converts it to a binary data
directly. Therefore, if you can't ensure the input value type, it would better to
call one of below functions intead.
By the way, you know what? Expression power of Protocol Buffer is not enough strong
to fully meet the TypeScript type specs. In such reason, if you put a TypeScript
type that is not compatible with Protocol Buffer, this function would throw
compilation errors.
Protocol Buffer Encoder.
Converts an input value to a binary data of Protocol Buffer format.
For reference, this
typia.protobuf.encode()
does not validate theinput
value. It just believes that theinput
value is valid and converts it to a binary data directly. Therefore, if you can't ensure theinput
value type, it would better to call one of below functions intead.By the way, you know what? Expression power of Protocol Buffer is not enough strong to fully meet the TypeScript type specs. In such reason, if you put a TypeScript type that is not compatible with Protocol Buffer, this function would throw compilation errors.