@protobuf-ts/runtime
Version:
Runtime library for code generated by the protoc plugin "protobuf-ts"
11 lines (10 loc) • 326 B
JavaScript
import { MESSAGE_TYPE } from './message-type-contract';
/**
* Check if the provided object is a proto message.
*
* Note that this is an experimental feature - it is here to stay, but
* implementation details may change without notice.
*/
export function containsMessageType(msg) {
return msg[MESSAGE_TYPE] != null;
}