Writer for TL objects.

Constructors

Properties

dataView: DataView
objectMap: undefined | TlWriterMap

Writers map

pos: number

Current position in the buffer.

uint8View: Uint8Array
platform: ITlPlatform

Methods

  • Parameters

    • fn: ((item: unknown, bare?: boolean) => void)
        • (item, bare?): void
        • Parameters

          • item: unknown
          • Optionalbare: boolean

          Returns void

    • val: unknown[]
    • Optionalbare: boolean

    Returns void

  • Serialize a single object

    Parameters

    • objectMap: TlWriterMap

      Writers map

    • obj: {
          _: string;
      }

      Object to serialize

      • _: string
    • knownSize: number = -1

      In case the size is known, pass it here

    Returns Uint8Array