Debian Codegraph @

node/@bufbuild/protobuf/dist/esm/merge.d.ts

raw
1 import type { MessageShape } from "./types.js";
2 import type { DescMessage } from "./descriptors.js";
3 /**
4 * Merge message `source` into message `target`, following Protobuf semantics.
5 *
6 * This is the same as serializing the source message, then deserializing it
7 * into the target message via `mergeFromBinary()`, with one difference:
8 * While serialization will create a copy of all values, `merge()` will copy
9 * the reference for `bytes` and messages.
10 *
11 * Also see https://protobuf.com/docs/language-spec#merging-protobuf-messages
12 */
13 export declare function merge<Desc extends DescMessage>(schema: Desc, target: MessageShape<Desc>, source: MessageShape<Desc>): void;