ProtobufSerializerOptionsBuilder
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Defined in: src/serialization/ProtobufSerializerOptions.ts:103
Fluent builder for ProtobufSerializerOptionsType:
const protobufOptions = ProtobufSerializerOptions.create<Order>() .withMessageType(messageType) .withId(101);const serializer = new ProtobufSerializer(protobufOptions);Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”T = unknown
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProtobufSerializerOptionsBuilder<
T>():ProtobufSerializerOptionsBuilder<T>
Returns
Section titled “Returns”ProtobufSerializerOptionsBuilder<T>
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”build()
Section titled “build()”build():
Partial<T>
Defined in: src/util/OptionsBuilder.ts:51
Snapshot the set fields as an independent Partial<T> (own props only).
Returns
Section titled “Returns”Partial<T>
Inherited from
Section titled “Inherited from”withId()
Section titled “withId()”withId(
id):this
Defined in: src/serialization/ProtobufSerializerOptions.ts:116
Wire identifier embedded in every frame. Must be >= 100.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
withManifest()
Section titled “withManifest()”withManifest(
manifest):this
Defined in: src/serialization/ProtobufSerializerOptions.ts:126
Manifest written alongside the bytes; '' writes none.
Parameters
Section titled “Parameters”manifest
Section titled “manifest”string
Returns
Section titled “Returns”this
withMessageType()
Section titled “withMessageType()”withMessageType(
messageType):this
Defined in: src/serialization/ProtobufSerializerOptions.ts:111
The compiled Protobuf message type that does the encoding.
Parameters
Section titled “Parameters”messageType
Section titled “messageType”Returns
Section titled “Returns”this
withName()
Section titled “withName()”withName(
name):this
Defined in: src/serialization/ProtobufSerializerOptions.ts:121
Diagnostic name shown in error messages.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withPlainObjects()
Section titled “withPlainObjects()”withPlainObjects(
plainObjects):this
Defined in: src/serialization/ProtobufSerializerOptions.ts:131
Decode to a plain object rather than a Message instance.
Parameters
Section titled “Parameters”plainObjects
Section titled “plainObjects”boolean
Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate<T>():ProtobufSerializerOptionsBuilder<T>
Defined in: src/serialization/ProtobufSerializerOptions.ts:106
Start a fresh builder.
Type Parameters
Section titled “Type Parameters”T = unknown
Returns
Section titled “Returns”ProtobufSerializerOptionsBuilder<T>
