tl icon indicating copy to clipboard operation
tl copied to clipboard

Creating type that yields type A if indexed with integer, and type B if indexed with string

Open Frityet opened this issue 2 years ago • 0 comments

Something like

type MyType = { integer: A, string: B }
local my_tbl: MyType = {
    [1] = make_a(),
    key = make_b()
}

It would be really nice and useful

Frityet avatar Nov 15 '23 18:11 Frityet