accessor
accessor
Last modified: 03 January 2025
This type represents a safe way to access maps.
Note that <type>
indicates the specific type this instance holds. accessor<texture>
for example means that get
will return an instance of texture
, and set
will only accept the type texture
as it's obj
parameter.
__index
Returns an object by key.
Arguments
Name
Type
Description
key
string
Object key.
Returns
Type
Description
<type>
Object.
Example
__newindex
Sets an object by key.
Arguments
Name
Type
Description
key
string
Object key.
obj
<type>
Object.
Returns
Nothing.
Example
Last updated