Skip to Content
defold-typescript libraries
paweljarosz

paweljarosz/lua-immutable/immutable

Runtime immutable Lua table implementation

  • GitHub: paweljarosz/lua-immutable — pinned to v1.1
    1. Pick a release from paweljarosz/lua-immutable releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as immutable from "immutable"

Functions

is_immutable(table_to_check: LuaTable | Immutable): boolean

Checks if a given table table_to_check is immutable

Parameters

  • table_to_check: LuaTable | Immutable — @table to check if is immutable

Returns

  • boolean — @true if table is immutable, false otherwise

make(original_table: LuaTable | Immutable): Immutable

Makes a given table immutable, including nested tables

Parameters

  • original_table: LuaTable | Immutable — @table to convert

Returns

  • Immutable — @converted table

On this page