Open
Description
const factionKeys = [
"bretonnia1",
"bretonnia1",
"bretonnia1",
"bretonnia1",
"bretonnia12"
]
declare interface OpaqueObject {}
declare function GetFaction(factionKey: string) : OpaqueObject
for (const f of factionKeys) {
try {
const nativeInterface = GetFaction(f)
} catch {
break
}
}
for (let i = 0; i < factionKeys.length; i++) {
try {
const nativeInterface = GetFaction(f)
} catch {
break
}
}
while(true) {
try {
const nativeInterface = GetFaction(factionKeys[0])
} catch {
break
}
}
do {
try {
const nativeInterface = GetFaction(factionKeys[0])
} catch {
break
}
} while (!false)
output
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
factionKeys = {
"bretonnia1",
"bretonnia1",
"bretonnia1",
"bretonnia1",
"bretonnia12"
}
for ____, f in ipairs(factionKeys) do
do
local function ____catch()
break -- <-- this caused syntax error
end
local ____try = pcall(function()
local nativeInterface = GetFaction(nil, f)
end)
if not ____try then
____catch()
end
end
end
do
i = 0
while i < #factionKeys do
do
local function ____catch()
break -- <-- this caused syntax error
end
local ____try = pcall(function()
local nativeInterface = GetFaction(nil, f)
end)
if not ____try then
____catch()
end
end
i = i + 1
end
end
while true do
do
local function ____catch()
break -- <-- this caused syntax error
end
local ____try = pcall(function()
local nativeInterface = GetFaction(nil, factionKeys[1])
end)
if not ____try then
____catch()
end
end
end
repeat
do
do
local function ____catch()
break -- <-- this caused syntax error
end
local ____try = pcall(function()
local nativeInterface = GetFaction(nil, factionKeys[1])
end)
if not ____try then
____catch()
end
end
end
until false