Type safe descriptor used to generate a descriptor map for MessageDescriptor.

binary layout for a message

Constructors

Properties

Methods

Constructors

  • Creates a descriptor for Message.

    Parameters

    • messageType: MessageType

      message type

    • Optional message: string | Uint8Array

      message payload

    Returns MessageDescriptor

Properties

rawDescriptor: {
    messageType: MessageType;
}

Type declaration

Methods

  • Builds a representation of this descriptor that can be passed to a factory function.

    Returns object

    Descriptor that can be passed to a factory function.