Its possible to check if a table is empty using the next function.
Currently I always have to do the following in my TS code when I want to test if a LuaSet/LuaMap is not empty:
if (next(luaSet)[0] != undefined) {
...
}
I think it would be very handy if you could abstract it into a fake isEmpty method/getter, which would transpile in the following way:
if (luaSet.isEmpty) {
...
}
should be equal to
if (next(luaSet)[0] == undefined) {
...
}
Its possible to check if a table is empty using the
nextfunction.Currently I always have to do the following in my TS code when I want to test if a LuaSet/LuaMap is not empty:
I think it would be very handy if you could abstract it into a fake
isEmptymethod/getter, which would transpile in the following way:should be equal to