Skip to main content

Array Class

Description:

  A class that creates Array objects.

__call

Type: Metamethod.

Description:

  Metamethod to create a new, empty array object.

Signature:

metamethod __call: function(self: ArrayClass): Array

Returns:

Return TypeDescription
ArrayA new Array object.

__call

Type: Metamethod.

Description:

  Metamethod to create a new array object initialized with a list of items.

Signature:

metamethod __call: function(self: ArrayClass, items: {Item}): Array

Parameters:

ParameterTypeDescription
items{Item}A table of items to initialize the array with.

Returns:

Return TypeDescription
ArrayA new Array object.