Skip to content

LuaTable as object member #699

Description

@TheLartians

Currently output is broken when LuaTable objects are used as object members.

Input

/** @LuaTable */
declare class LuaTable<K extends {} = {}, V = any> {
  readonly length: number;
  set(key: K, value: V): void;
  get(key: K): V;
}

const k = "k"
const t = { data: new LuaTable() }
const v = t.data.get(k)
t.data.set(k,v)

Output

local t = {data = {}}
local v = .k
local k = "k"
[k] = v

Expected

local t = {data = {}}
local v = t.data.k
local k = "k"
t.data[k] = v

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions