Constructors
constructor
- new TlBinaryWriter(
objectMap: undefined | TlWriterMap,
data: ArrayBuffer,
start?: number,
): TlBinaryWriter Parameters
- objectMap: undefined | TlWriterMap
- data: ArrayBuffer
- start: number = 0
Properties
Readonly
dataView
dataView: DataView
Readonly
objectMap
pos
pos: number
Readonly
uint8View
uint8View: Uint8Array
Methods
boolean
- boolean(val: boolean): void
Returns void
bytes
- bytes(val: Uint8Array): void
Returns void
double
- double(val: number): void
Returns void
float
- float(val: number): void
Returns void
int
- int(val: number): void
Returns void
int128
- int128(val: Uint8Array): void
Returns void
int256
- int256(val: Uint8Array): void
Returns void
int53
- int53(val: number): void
Returns void
long
- long(val: Long): void
Returns void
null
- null(): void
Returns void
object
- object(obj: any): void
Returns void
raw
- raw(val: Uint8Array): void
Returns void
result
- result(): Uint8Array
Returns Uint8Array
string
- string(val: string): void
Returns void
uint
- uint(val: number): void
Returns void
vector
- vector(
fn: (item: unknown, bare?: boolean) => void,
val: unknown[],
bare?: boolean,
): void Parameters
- fn: (item: unknown, bare?: boolean) => void
- val: unknown[]
Optional
bare: boolean
Returns void
Static
manual
- manual(buffer: number | ArrayBuffer, start?: number): TlBinaryWriter
Parameters
- buffer: number | ArrayBuffer
- start: number = 0
Static
serializeObject
- serializeObject(
objectMap: TlWriterMap,
obj: { _: string },
knownSize?: number,
): Uint8Array Parameters
- objectMap: TlWriterMap
- obj: { _: string }
- knownSize: number = -1
Returns Uint8Array
Writer for TL objects.