(thread: Thread, index: number)
| 92 | } |
| 93 | |
| 94 | private readTableKeys(thread: Thread, index: number): string[] { |
| 95 | const keys = [] |
| 96 | |
| 97 | thread.lua.lua_pushnil(thread.address) |
| 98 | while (thread.lua.lua_next(thread.address, index)) { |
| 99 | // JS only supports string keys in objects. |
| 100 | const key = thread.indexToString(-2) |
| 101 | keys.push(key) |
| 102 | // Pop the value. |
| 103 | thread.pop() |
| 104 | } |
| 105 | |
| 106 | return keys |
| 107 | } |
| 108 | |
| 109 | private readTableValues(thread: Thread, index: number, seenMap: Map<number, TableType>, table: TableType): void { |
| 110 | const isArray = Array.isArray(table) |
no test coverage detected