Skip to content

Commit

Permalink
Document new behavior
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Haines <andrew@haines.org.nz>
  • Loading branch information
haines committed Oct 13, 2023
1 parent 7f6e32c commit c302eb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/protobuf/src/to-plain-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ import { Message } from "./message.js";
import type { AnyMessage, PlainMessage } from "./message.js";

/**
* toPlainMessage returns a new object by striping
* toPlainMessage returns a new object by stripping
* all methods from a message, leaving only fields and
* oneof groups. It is recursive, meaning it applies this
* same logic to all nested message fields as well.
*
* If the argument is already a plain message, it is
* returned as-is.
*/
export function toPlainMessage<T extends Message<T>>(
message: T | PlainMessage<T>,
Expand Down

0 comments on commit c302eb6

Please sign in to comment.