Skip to main content

Interface: BaseType<T>

Base type for all data types.

Type Parameters

Type ParameterDescription

T

The type of the data to encode and decode.

Methods

write()

write(value: T, writer: BufferWriter): void

Writes the value to the buffer.

Parameters

ParameterTypeDescription

value

T

The value to write.

writer

BufferWriter

The buffer writer.

Returns

void

Defined in

types/base.ts:16


read()

read(reader: BufferReader): T

Reads the value from the buffer.

Parameters

ParameterTypeDescription

reader

BufferReader

The buffer reader.

Returns

T

The value read from the buffer.

Defined in

types/base.ts:23