@bufbuild/protobuf
Version:
A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.
8 lines (7 loc) • 348 B
TypeScript
import type { MessageShape } from "./types.js";
import type { DescMessage } from "./descriptors.js";
/**
* Determine whether the given `arg` is a message.
* If `desc` is set, determine whether `arg` is this specific message.
*/
export declare function isMessage<Desc extends DescMessage>(arg: unknown, schema?: Desc): arg is MessageShape<Desc>;