Skip to content
IonizeDocsionize.cc ↗

API Reference

Metatable Library

Reading and modifying metatables, including read only protection.

5 members

getrawmetatable(object: any): table

Returns the metatable of a value, ignoring protection.

setrawmetatable<T>(object: T, metatable: table): T

Replaces the metatable of a value.

setreadonly(table: table, readonly: boolean): ()

Sets whether a table can be written to.

isreadonly(table: table): boolean

Returns whether a table is protected from writes.

hookmetamethod<T>(object: any, method: string, hook: T): T

Replaces a metamethod and returns the original.