Options
All
  • Public
  • Public/Protected
  • All
Menu

Module protoflex

Index

Type aliases

BufferLike

BufferLike: number[] | ArrayLike<number> | ArrayBufferLike | Buffer | Uint8Array

Dict

Dict<V>: object

Type parameters

  • V

Type declaration

  • [key: string]: V

KnownField

KnownField: number | object

MessageField

MessageField: object

Represents a single field

Type declaration

  • Optional key?: number

    Field key. Is missing when field key is inferred from context (e.g. object key)

  • type: PB_Type

    Field type

  • value: any

    Field value

PB_Bool

PB_Bool: "bool"

Represents a Protobuf bool type

PB_Bytes

PB_Bytes: "bytes"

Represents a Protobuf bytes type

PB_Double

PB_Double: "double"

Represents a Protobuf double type

PB_Fixed32

PB_Fixed32: "fixed32"

Represents a Protobuf fixed32 type

PB_Fixed64

PB_Fixed64: "fixed64"

Represents a Protobuf fixed64 type

PB_Float

PB_Float: "float"

Represents a Protobuf float type

PB_Fraction

PB_Fraction: PB_Float | PB_Double

Represents numbers that are not integers

PB_Int32

PB_Int32: "int32"

Represents a Protobuf int32 type

PB_Int64

PB_Int64: "int64"

Represents a Protobuf int64 type

PB_Long

Represents types that are available as Long

PB_Message

PB_Message: "message"

Represents a Protobuf message type

PB_Number

Represents types that are available as Number

PB_SFixed32

PB_SFixed32: "sfixed32"

Represents a Protobuf sfixed32 type

PB_SFixed64

PB_SFixed64: "sfixed64"

Represents a Protobuf sfixed64 type

PB_SInt32

PB_SInt32: "sint32"

Represents a Protobuf sint32 type

PB_SInt64

PB_SInt64: "sint64"

Represents a Protobuf sint64 type

PB_String

PB_String: "string"

Represents a Protobuf string type

PB_Type

Common type representing all possible Protobuf types

PB_UInt32

PB_UInt32: "uint32"

Represents a Protobuf uint32 type

PB_UInt64

PB_UInt64: "uint64"

Represents a Protobuf uint64 type

PB_Varint

Represents types that are encoded as a varint

Functions

create

fromHex

  • Parse given hexadecimal string as a Protobuf message

    Parameters

    • data: string

      Hexadecimal string

    Returns OutputMessage

fromJson

  • Create a Protobuf message using JSON API

    Parameters

    • data: any

      String or JSON API object

    Returns InputMessage

parse

Generated using TypeDoc