lua-to-typescript-fixed
v0.3.2
Published
Transforms Lua to TypeScript code. (originally from hazzard993)
Downloads
13
Readme
Transpiles Lua to TypeScript declaration and/or TypeScript source code.
npm install -g lua-to-typescript-fixedTo transpile files...
lttsf main.lua
# Generates main.ts
lttsf a.lua b.lua c.lua ...
# Generates a.ts, b.ts, c.ts, ...
lttsf -d library.lua
# Generates library.d.tsLDoc
This program uses LDoc type annotations for type information that is used in generated TypeScript code.
--- @tparam number a
--- @treturn number
local function f(a)
return a
end
return aLoosely translates to the below code. Note the type annotations.
function f(a: number): number {
return a;
}
export = f;