-- Lua Library Imports
local exports = exports or {}
local function __TS__ArrayMap(arr,callbackfn)
local newArray = {}
local i = 0
while(i<#arr) do
do
newArray[i+1] = callbackfn(arr[i+1],i,arr)
end
i = (i+1)
end
return newArray
end
return exports
local exports = exports or {}
local function __TS__ArrayPush(arr,...)
local items = { ... }
for _, item in ipairs(items) do
do
arr[#arr+1] = item
end
end
return #arr
end
return exports
local exports = exports or {}
local f = function(xs) return __TS__ArrayPush(__TS__ArrayMap(xs, function(i) return i+1 end), 42) end
return exports
{
"compilerOptions": {
"esModuleInterop": false,
"jsx": "react",
"jsxFactory": "h",
"lib": ["es6"],
"module": "commonjs",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "dist",
"removeComments": true,
"strict": true,
"target": "es2017"
},
"include": ["example", "lib", "src", "test"],
"luaTarget": "5.1",
"luaLibImport": "inline"
}
gives
that is, with 3
returns. My config is