Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ Protobuf-ES generates the following property:
/**
* @generated from field: example.User manager = 4;
*/
manager?: User
manager?: User | undefined;
```

Message fields don't have default values in Protobuf. They are always optional in ECMAScript.
Expand Down Expand Up @@ -531,7 +531,7 @@ For this group field, Protobuf-ES generates the following property and the messa
/**
* @generated from field: optional example.User.MyGroup mygroup = 1;
*/
mygroup?: User_MyGroup;
mygroup?: User_MyGroup | undefined;
```

> [!CAUTION]
Expand Down Expand Up @@ -567,7 +567,7 @@ The field is generated as an optional property:
/**
* @generated from field: optional bool active = 3;
*/
active?: boolean;
active?: boolean | undefined;
```

> [!TIP]
Expand Down Expand Up @@ -953,7 +953,7 @@ field, it's generated as the type `JsonObject` from [@bufbuild/protobuf]. For ex
/**
* @generated from field: google.protobuf.Struct struct = 1;
*/
struct?: JsonObject;
struct?: JsonObject | undefined;
```

This feature makes it very easy to work with `Struct` fields:
Expand All @@ -977,7 +977,7 @@ For convenience, it generates fields that use one of the wrapper messages as "un
/**
* @generated from field: google.protobuf.BoolValue bool_value_field = 1;
*/
boolValueField?: boolean;
boolValueField?: boolean | undefined;
```

## Working with messages
Expand Down Expand Up @@ -1219,7 +1219,7 @@ Options for `toJson` and `toJsonString`:
### Unknown fields

When binary message data is parsed, unrecognized fields are stored on the message as unknown fields in the property
`$unknown?: UnknownField[]`. When the message is serialized, unknown fields are included, preserving them.
`$unknown?: UnknownField[] | undefined`. When the message is serialized, unknown fields are included, preserving them.

This default behavior can be modified with the [binary serialization options](#binary-serialization-options)
`readUnknownFields` and `writeUnknownFields`.
Expand Down
2 changes: 1 addition & 1 deletion bun/conformance/src/gen/conformance/conformance_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions bun/conformance/src/gen/google/protobuf/test_messages_proto2_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading