Skip to main content

Class: List<T>

A type that represents a list of items of a specific type. Similar to an array in JavaScript.

Type Parameters

Type ParameterDescription

T

The type of the items in the list.

Implements

Accessors

of

Get Signature

get of(): BaseType<T>

Gets the base type of the items in the list.

Returns

BaseType<T>

Defined in

types/list.ts:28

Constructors

new List()

new List<T>(of: BaseType<T>): List<T>

Creates a new list type.

Parameters

ParameterTypeDescription

of

BaseType<T>

The type of the items in the list.

Returns

List<T>

Defined in

types/list.ts:21

Methods

write()

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

Writes the list to the buffer.

Parameters

ParameterTypeDescription

value

T[]

An array of items to write.

writer

BufferWriter

The buffer writer.

Returns

void

Implementation of

BaseType.write

Defined in

types/list.ts:37


read()

read(reader: BufferReader): T[]

Reads the list from the buffer.

Parameters

ParameterTypeDescription

reader

BufferReader

The buffer reader.

Returns

T[]

An array of items read from the buffer.

Implementation of

BaseType.read

Defined in

types/list.ts:50